    /* Scrollbar Minimalista - MacOS Style */
    ::-webkit-scrollbar { width: 12px; height: 12px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--accent-red); }

    /* Variables y base */
    :root {
        --bg-main: #0a0b10;
        --glass-bg: rgba(23, 25, 35, 0.75);
        --glass-border: rgba(255, 255, 255, 0.1);
        --accent-red: #e63946;
        --accent-glow: rgba(230, 57, 70, 0.4);
        --redcol: #e63946;
        --redcol-light: #ff4b2b;
        --redcol-dark: #8a0000;
        --text-main: #f8f9fa;
        --text-muted: #8e9196;
        --accent: #ffffff;
        --success: #10b981;
        --warning: #f59e0b;
        --error: #ef4444;
        --blur: blur(15px);
    }

    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    body {
        background: radial-gradient(circle at 50% 0%, #1e2029 0%, var(--bg-main) 100%) !important;
        background-attachment: fixed;
        color: var(--text-main) !important;
        font-family: 'Inter', -apple-system, sans-serif;
        min-height: 100vh;
        overflow-x: hidden;
        font-size: 14px;
        letter-spacing: -0.01em;
        position: relative;
    }

    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: 
            radial-gradient(at 0% 0%, rgba(230, 57, 70, 0.05) 0px, transparent 50%),
            radial-gradient(at 100% 100%, rgba(30, 144, 255, 0.05) 0px, transparent 50%);
        z-index: -1;
        filter: blur(80px);
        animation: meshRotate 60s infinite alternate;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        font-family: 'Outfit', sans-serif;
        color: var(--accent);
    }

    .text-redcol {
        color: var(--redcol);
        font-weight: 700;
    }

    .text-muted {
        color: var(--text-muted);
    }

    .text-center {
        text-align: center;
    }

    .text-success {
        color: var(--success);
    }

    .font-weight-bold {
        font-weight: bold;
    }

    /* Logo Systems */
    .logo-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 30px;
        width: 100%;
        overflow: hidden;
    }

    .logo-main {
        width: 100%;
        max-width: 320px;
        height: auto;
        min-height: 40px;
        margin-bottom: 20px;
        object-fit: contain;
        filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
        display: block;
    }

    .sidebar-logo-img {
        width: auto;
        max-width: 160px;
        height: auto;
        min-height: 30px;
        margin: 0 auto;
        object-fit: contain;
        display: block;
    }

    .logo-circle {
        width: 80px;
        height: 80px;
        background: var(--bg-card);
        border: 2px solid var(--redcol-light);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 2.5rem;
        color: var(--redcol-light);
        margin-bottom: 15px;
        position: relative;
    }

    .sidebar-logo-small {
        width: 40px;
        height: 40px;
        background: rgba(230, 57, 70, 0.1);
        border: 1px solid var(--accent-red);
        border-radius: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.5rem;
        color: var(--accent-red);
        margin-right: 12px;
    }

    .mb-2 {
        margin-bottom: 20px;
    }

    .mt-1 {
        margin-top: 10px;
    }

    .mt-2 {
        margin-top: 20px;
    }

    .p-2 {
        padding: 20px;
    }

    .w-50 {
        width: 48%;
    }

    .w-100 {
        width: 100%;
    }

    .flex-row {
        display: flex;
        flex-direction: row;
    }

    .align-center {
        align-items: center;
    }

    .flex-grow {
        flex-grow: 1;
    }

    .ml-2 {
        margin-left: 20px;
    }

    /* Loader */
    .loader-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 17, 21, 0.8);
        backdrop-filter: blur(10px);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .spinner {
        width: 50px;
        height: 50px;
        border: 4px solid var(--border-glass);
        border-top-color: var(--redcol);
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-bottom: 15px;
    }

    .inline-sp {
        width: 20px;
        height: 20px;
        border-width: 2px;
        display: inline-block;
        vertical-align: middle;
        margin-bottom: 0;
        margin-right: 10px;
    }

    @keyframes spin {
        100% {
            transform: rotate(360deg);
        }
    }

    /* Views */
    .view-container {
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .view-container.active {
        display: flex;
        opacity: 1;
        min-height: 100vh;
    }

    .content-view {
        display: none;
        opacity: 0;
        transition: opacity 0.3s;
        animation: fadeIn 0.4s ease;
    }

    .content-view.active {
        display: block;
        opacity: 1;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Glass elements - SaaS Style */
    .glass-panel,
    .glass-sidebar,
    .glass-card,
    .glass-modal .modal-content,
    [class*="container"]:not(.logo-container, .logo-img-container, .header-left, .header-flex) {
        background: rgba(15, 17, 21, 0.88) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
        position: relative;
    }

    /* Brillo en el borde superior para dar profundidad */
    .glass-panel::before, .glass-card::before, .glass-sidebar::before {
        content: "";
        position: absolute;
        top: 0; left: 0; right: 0; height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
        pointer-events: none;
        z-index: 1;
    }

    /* Reset para contenedores de logos e internos */
    .logo-container, .logo-img-container, .header-left, .header-flex {
        background: transparent !important;
        border: none !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
    }

    /* Login */
    #login-view {
        justify-content: center;
        align-items: center;
    }

    .login-box {
        padding: 40px;
        width: 100%;
        max-width: 400px;
        text-align: center;
    }

    .logo-container h1 {
        font-size: 2.5rem;
        margin-bottom: 5px;
    }

    .logo-container p {
        color: var(--text-muted);
        margin-bottom: 30px;
    }

    /* Inputs & Forms */
    .input-group,
    .input-with-icon {
        position: relative;
        margin-bottom: 15px;
    }

    .input-group i,
    .input-with-icon i {
        position: absolute;
        left: 15px;
        top: 12px;
        color: var(--text-muted);
        font-size: 1.2rem;
    }

    input:not([type="radio"]):not([type="checkbox"]),
    select,
    textarea,
    .glass-input,
    .glass-select {
        width: 100%;
        padding: 12px 15px 12px 45px;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: 8px !important;
        color: white !important;
        font-family: 'Inter', sans-serif;
        outline: none;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    input:focus,
    select:focus {
        border-color: var(--redcol);
        box-shadow: 0 0 0 3px rgba(192, 0, 0, 0.2);
    }

    .glass-select,
    .glass-input {
        padding-left: 15px;
    }

    .input-with-icon.error-focus input:focus {
        border-color: var(--error);
        box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
    }

    .input-with-icon.success-focus input:focus {
        border-color: var(--success);
        box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
    }

    .editable-highlight {
        border-color: rgba(192, 0, 0, 0.3) !important;
        box-shadow: 0 0 4px rgba(192, 0, 0, 0.1);
    }

    .editable-highlight:focus {
        border-color: var(--redcol) !important;
        box-shadow: 0 0 0 3px rgba(192, 0, 0, 0.2) !important;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        font-size: 0.9rem;
    }

    .form-group small {
        color: var(--text-muted);
        font-size: 0.8rem;
    }

    .form-row {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 15px;
    }

    .w-25 {
        width: calc(25% - 15px);
    }

    .w-33 {
        width: calc(33.33% - 15px);
    }

    .w-50 {
        width: calc(50% - 15px);
    }

    .w-100 {
        width: 100%;
    }

    .flex-wrap {
        flex-wrap: wrap;
    }

    .p-1 {
        padding: 5px;
    }

    .ml-1 {
        margin-left: 10px;
    }

    .mt-1 {
        margin-top: 10px;
    }

    .mt-2 {
        margin-top: 20px;
    }

    .mb-2 {
        margin-bottom: 20px;
    }

    .font-weight-bold {
        font-weight: 600;
    }

    /* Select option styles inside a dark theme */
    select option {
        background-color: #171923 !important;
        color: white !important;
    }

    /* Buttons */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 20px;
        border: none;
        border-radius: 8px;
        font-family: 'Outfit', sans-serif;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        gap: 8px;
    }

    .btn-primary,
    button:not(.tab-btn):not(.btn-close-modal):not(.btn-sync):not(#btn-menu):not(.sim-action-btn):not(.stock-search-btn) {
        background: linear-gradient(135deg, #ff4b2b, #ff416c) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 15px var(--accent-glow) !important;
        transition: all 0.3s ease !important;
        text-transform: uppercase;
        font-weight: 600;
        letter-spacing: 0.5px;
    }

    .btn-primary:hover,
    button:not(.tab-btn):not(.btn-close-modal):not(.btn-sync):not(#btn-menu):not(.sim-action-btn):not(.stock-search-btn):hover {
        background: linear-gradient(135deg, #ff416c, #ff4b2b) !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6) !important;
    }

    /* Loading Button State */
    .btn.loading, button.loading {
        color: transparent !important;
        pointer-events: none;
        position: relative;
    }

    .btn.loading::after, button.loading::after {
        content: "";
        position: absolute;
        width: 16px;
        height: 16px;
        top: 50%;
        left: 50%;
        margin-left: -8px;
        margin-top: -8px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border-top-color: #fff;
        animation: spin 0.6s linear infinite;
    }

    .btn-block {
        width: 100%;
    }

    .btn-outline {
        background: transparent;
        border: 1px solid var(--border-glass);
        color: var(--text-main);
    }

    .btn-outline:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .btn-icon {
        padding: 10px;
        border-radius: 8px;
    }

    .btn-lg {
        padding: 15px 25px;
        font-size: 1.1rem;
    }

    .shadow-red {
        box-shadow: 0 4px 15px rgba(192, 0, 0, 0.4);
    }

    .link-subtle {
        display: inline-block;
        margin-top: 15px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.9rem;
    }

    .link-subtle:hover {
        color: var(--accent);
    }

    /* Sidebar */
    .glass-sidebar {
        width: 250px;
        min-width: 250px;
        flex-shrink: 0 !important;
        padding: 15px;
        display: flex;
        flex-direction: column;
        border-right: 1px solid var(--border-glass);
        border-radius: 0 !important;
        position: sticky;
        top: 0;
        height: 100vh;
    }

    .sidebar-header {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 30px;
        width: 100%;
        padding: 5px 0;
        position: relative;
    }

    .sidebar-nav {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 5px;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 5px;
        margin-right: -5px;
    }

    /* Scrollbar Slim para Sidebar */
    .sidebar-nav::-webkit-scrollbar {
        width: 8px;
    }
    .sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }
    .sidebar-nav::-webkit-scrollbar-thumb:hover {
        background: var(--accent-red);
    }

    .nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 15px !important;
        margin-bottom: 0 !important;
        color: var(--text-muted);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .nav-item.active {
        background: var(--glass-border) !important;
        color: var(--accent);
        border-left: 3px solid var(--accent-red);
        box-shadow: -5px 0 15px var(--accent-glow);
        margin-bottom: 0 !important;
    }

    .hidden-nav {
        display: none !important;
    }

    .nav-item:hover {
        background: rgba(255, 255, 255, 0.08);
        color: var(--accent);
        box-shadow: -5px 0 15px var(--accent-glow);
        transform: translateX(4px);
        margin-bottom: 0 !important;
    }

    .nav-item i {
        font-size: 1.2rem;
    }

    .sidebar-footer {
        padding-top: 15px;
        margin-top: auto;
        border-top: 1px solid var(--border-glass);
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .sidebar-footer-actions {
        display: flex;
        gap: 8px;
    }

    .user-info {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .user-info i {
        font-size: 1.8rem;
        color: var(--accent-red);
        opacity: 0.9;
    }

    .user-details {
        display: flex;
        flex-direction: column;
    }

    .user-details span {
        font-size: 0.9rem;
        font-weight: 500;
    }

    .user-details .user-role {
        font-size: 0.8rem;
        color: var(--text-muted);
    }

    /* Main Content */
    .main-content {
        flex-grow: 1;
        padding: 25px;
        overflow-y: auto;
        height: 100vh;
    }

    .view-scroll-area {
        width: 100%;
        height: auto;
    }

    .mobile-header {
        display: none;
    }

    .header-flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px !important;
    }

    .view-title {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .view-subtitle {
        color: var(--text-muted);
        font-size: 1rem;
    }

    .controls-flex {
        display: flex;
        gap: 10px;
        align-items: center;
    }

    /* Grid Cards */
    .cards-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }

    /* Dashboard V3 Layout */
    .dashboard-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    /* Stat Boxes */
    .stat-box {
        display: flex;
        align-items: center;
        padding: 20px;
        gap: 20px;
        transition: transform 0.3s ease, background 0.3s ease;
    }

    .stat-box:hover {
        transform: translateY(-5px);
        background: rgba(255, 255, 255, 0.08);
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        background: rgba(230, 57, 70, 0.15);
        border: 1px solid var(--accent-red);
        border-radius: 12px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.5rem;
        color: var(--accent-red);
    }

    .stat-content {
        display: flex;
        flex-direction: column;
    }

    .stat-label {
        font-size: 0.85rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .stat-content h2 {
        font-size: 1.8rem;
        margin: 0;
        color: var(--accent);
    }

    .tab-group {
        display: flex;
        background: rgba(0, 0, 0, 0.4);
        padding: 4px;
        border-radius: 12px;
        border: 1px solid var(--border-glass);
    }

    .tab-btn {
        background: transparent;
        border: none;
        color: var(--text-muted);
        padding: 8px 16px;
        border-radius: 8px;
        cursor: pointer;
        font-family: 'Outfit', sans-serif;
        font-weight: 600;
        font-size: 0.85rem;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .tab-btn:hover {
        color: var(--text-main);
    }

    .tab-btn.active {
        background: var(--redcol);
        color: white;
        box-shadow: 0 4px 12px rgba(192, 0, 0, 0.3);
    }

    .tab-content {
        display: none;
        animation: fadeIn 0.3s ease;
    }

    .tab-content.active {
        display: block;
    }

    .dash-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }

    .stat-card {
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        transition: all 0.3s ease;
    }

    .stat-card:hover {
        transform: translateY(-5px);
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .stat-label {
        font-family: 'Outfit', sans-serif;
        color: var(--text-muted);
    }

    .stat-value {
        font-family: 'Outfit', sans-serif;
        font-weight: 700;
        color: #fff;
    }

    .stat-icon-bg {
        transition: all 0.3s ease;
    }

    .stat-card:hover .stat-icon-bg {
        transform: scale(1.1);
    }

    /* Full-width Matrix Styles */
    .contractor-matrix-container {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    /* Custom Scrollbar for Matrix */
    .contractor-matrix-container::-webkit-scrollbar {
        height: 12px;
    }
    .contractor-matrix-container::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }
    .contractor-matrix-container::-webkit-scrollbar-thumb {
        background: var(--redcol);
        border-radius: 4px;
    }
    .contractor-matrix-container::-webkit-scrollbar-thumb:hover {
        background: var(--accent-red);
    }

    .matrix-table {
        width: 100%;
        border-collapse: collapse;
        color: white;
        font-size: 0.9rem;
    }

    .matrix-table th {
        background: rgba(0, 0, 0, 0.5);
        color: var(--accent);
        font-weight: 700;
        padding: 12px 15px;
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
        text-transform: uppercase;
        letter-spacing: 1px;
        white-space: nowrap;
    }

    .matrix-table td {
        padding: 12px 15px;
        text-align: center;
        border: 1px solid rgba(255, 255, 255, 0.05);
        font-family: 'JetBrains Mono', monospace;
    }

    .matrix-table td:first-child {
        text-align: left;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.05);
        position: sticky;
        left: 0;
        z-index: 2;
        border-right: 2px solid var(--redcol);
    }

    .matrix-val {
        font-weight: 600;
        font-size: 1.1rem;
    }

    .matrix-zero {
        color: rgba(255, 255, 255, 0.2);
    }

    .matrix-total-cell {
        background: rgba(255, 255, 255, 0.1);
        font-weight: 800;
        color: var(--accent);
    }

    .matrix-grand-total {
        background: var(--redcol) !important;
        color: white !important;
        font-weight: 900;
        font-size: 1.2rem;
    }

    .matrix-priority {
        background: rgba(255, 193, 7, 0.15) !important;
        border-bottom: 2px solid var(--warning) !important;
    }

    .matrix-priority-head {
        background: rgba(255, 193, 7, 0.25) !important;
        color: #ffca28 !important;
        border-bottom: 2px solid var(--warning) !important;
    }

    .total-row td {
        background: rgba(0, 0, 0, 0.4);
        font-weight: 800;
        border-top: 2px solid var(--redcol);
    }

    .dash-table-card {
        padding: 12px;
        display: flex;
        flex-direction: column;
    }

    .dash-table-card h3 {
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: #f8f9fa;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--glass-border);
    }

    .dash-table-card table {
        width: 100%;
        margin-top: 10px;
        border-collapse: separate;
        border-spacing: 0 5px;
    }

    .dash-table-card th {
        text-align: left;
        color: var(--text-muted);
        font-weight: 500;
        padding: 10px 12px !important;
        font-size: 0.8rem;
    }

    .dash-table-card td {
        padding: 10px 12px !important;
        font-size: 0.8rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .dash-table-card tr:last-child td {
        border-bottom: none;
    }

    .dash-table-card .total-row {
        font-weight: 700;
        color: var(--text-main);
        background: rgba(230, 57, 70, 0.05) !important;
        border-top: 2px solid var(--accent-red) !important;
        border-bottom: 2px solid var(--accent-red) !important;
        box-shadow: 0 -2px 10px rgba(230, 57, 70, 0.1);
        margin-top: 5px;
    }

    .dash-table-card .val-num {
        background: rgba(0, 0, 0, 0.3);
        padding: 4px 10px;
        border-radius: 30px;
        font-family: 'JetBrains Mono', monospace;
        font-weight: 600;
        text-align: right;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    }

    .sim-action-card, [class*="slot-container"] {
        background: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        border-top: 2px solid rgba(255, 255, 255, 0.1) !important;
        padding: 20px !important;
        margin-top: 15px !important;
        border-radius: 12px !important;
        display: grid;
        gap: 10px;
        backdrop-filter: blur(10px);
        position: relative;
        overflow: hidden;
    }

    .sim-action-card::after, [class*="slot-container"]::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 30px;
        height: 100%;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent);
        pointer-events: none;
    }

    .slot-label {
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: var(--accent-red);
        font-weight: 800;
        margin-bottom: 5px;
        display: block;
    }

    .sim-info-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--border-glass);
        padding-bottom: 6px;
    }

    .sim-info-header span {
        font-weight: 600;
        font-family: 'Outfit', sans-serif;
        font-size: 0.85rem;
    }

    .sim-pills {
        display: flex;
        flex-direction: column;
        gap: 2px;
        text-align: right;
    }

    .sim-pill {
        font-size: 0.75rem;
        color: var(--text-main);
        display: block;
        background: rgba(255, 255, 255, 0.05);
        padding: 2px 6px;
        border-radius: 4px;
        margin-bottom: 2px;
        font-family: 'JetBrains Mono', 'Roboto Mono', monospace !important;
        letter-spacing: -0.02em;
    }

    .sim-pill[title="UICC"] {
        border-left: 3px solid var(--success);
    }

    .sim-pill[title="PCS"] {
        border-left: 3px solid var(--primary);
    }

    .operator-val {
        font-size: 0.65rem;
        background: rgba(255, 255, 255, 0.1);
        padding: 1px 4px;
        border-radius: 3px;
        text-transform: uppercase;
        font-weight: 700;
        margin-top: 2px;
        display: inline-block;
    }

    .sim-detail-box {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid var(--border-glass);
        border-radius: 6px;
        padding: 8px;
        margin-top: 8px;
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .sim-detail-box strong {
        color: var(--redcol);
    }

    .sim-actions-toggle {
        display: flex;
        gap: 4px;
        background: rgba(0, 0, 0, 0.2);
        padding: 3px;
        border-radius: 8px;
    }

    .sim-action-btn {
        flex: 1;
        background: transparent;
        border: none;
        color: var(--text-muted);
        padding: 5px 2px;
        border-radius: 5px;
        font-size: 0.7rem;
        cursor: pointer;
        transition: all 0.2s;
        text-align: center;
        font-weight: 500;
        white-space: nowrap;
    }

    .sim-action-btn:hover {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-main);
    }

    .sim-action-btn.active[data-action="TRANSFER"] {
        background: var(--success);
        color: white;
    }

    .sim-action-btn.active[data-action="STOCK"] {
        background: var(--warning);
        color: white;
    }

    .sim-action-btn.active[data-action="RECICLAJE"] {
        background: var(--error);
        color: white;
    }

    .sim-action-btn.active[data-action="NONE"] {
        background: var(--text-muted);
        color: white;
    }

    .sim-action-btn.active[data-action="KEEP"] {
        background: #007bff;
        color: white;
    }

    .sim-stock-lookup {
        display: flex;
        gap: 5px;
        margin-top: 5px;
        padding-top: 5px;
        border-top: 1px dashed var(--border-glass);
    }

    .sim-stock-lookup input {
        padding: 4px 8px;
        font-size: 0.75rem;
        padding-left: 8px;
        flex-grow: 1;
        background: rgba(0, 0, 0, 0.5);
        border: 1px solid var(--border-glass);
        border-radius: 4px;
        color: white;
    }

    .sim-stock-lookup .btn-icon {
        padding: 4px 6px;
        background: var(--redcol);
        border-radius: 4px;
        color: white;
    }

    .sim-found-badge {
        font-size: 0.7rem;
        color: #81c784;
        margin-top: 2px;
        font-weight: 600;
    }

    /* REDISEÑO BODEGA: TARJETAS POR TIPO */
    .bodega-type-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
        margin-top: 1.5rem;
        width: 100%;
    }

    .type-card {
        background: rgba(40, 44, 52, 0.45);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 15px;
        padding: 1.5rem;
        transition: border-color 0.3s ease, transform 0.3s ease;
        display: flex;
        flex-direction: column;
        min-height: 200px;
        backdrop-filter: blur(10px);
        position: relative;
        overflow: hidden;
    }

    .type-card:hover {
        transform: translateY(-5px);
        border-color: rgba(230, 57, 70, 0.6) !important;
        background: rgba(50, 56, 68, 0.6);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    }

    .type-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 0.8rem;
        margin-bottom: 1rem;
    }

    .type-name {
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--primary-light);
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .type-count {
        background: rgba(230, 57, 70, 0.1) !important;
        color: var(--redcol-light) !important;
        padding: 5px 12px !important;
        border-radius: 30px !important;
        font-family: 'JetBrains Mono', monospace !important;
        box-shadow: inset 0 2px 4px rgba(230, 57, 70, 0.2);
    }

    .type-models-table {
        width: 100%;
        font-size: 0.85rem;
        border-collapse: collapse;
    }

    .type-models-table td {
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .type-models-table .model-name {
        color: #eee;
        font-weight: 500;
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .type-models-table .model-qty {
        text-align: right;
        font-weight: 700;
        color: var(--accent);
        font-size: 1rem;
    }

    .type-card-footer {
        margin-top: auto;
        padding-top: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.8rem;
    }

    .type-value {
        color: #888;
        font-weight: 500;
    }

    .badge-assigned {
        color: #ffab40;
        font-weight: 600;
    }

    .badge-available {
        color: #69f0ae;
        font-weight: 600;
    }

    .action-buttons {
        display: flex;
        gap: 15px;
        margin-top: 15px;
    }

    /* Tables - Optimized & Compact */
    .table-container-fixed {
        flex-grow: 1;
        overflow: auto;
        border: 1px solid var(--border-glass);
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.2);
        max-height: calc(100vh - 250px);
    }

    .table-container-auto {
        flex-grow: 1;
        border: 1px solid var(--border-glass);
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.2);
        height: auto;
        min-height: 100px;
        margin-bottom: 10px;
    }

    .contractor-matrix-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 10px;
    }

    .contractor-matrix-card {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-glass);
        border-radius: 12px;
        padding: 15px;
        overflow-x: auto;
    }

    .contractor-matrix-card h4 {
        color: var(--redcol-light);
        margin-bottom: 12px;
        font-size: 1rem;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .matrix-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.8rem;
    }

    .matrix-table th {
        background: rgba(15, 17, 21, 0.6);
        color: var(--text-muted);
        text-transform: uppercase;
        padding: 8px 12px;
        border-bottom: 1px solid var(--border-glass);
        text-align: center;
        min-width: 80px;
    }

    .matrix-table th:first-child {
        text-align: left;
        position: sticky;
        left: 0;
        background: rgba(20, 22, 26, 0.95);
        z-index: 2;
    }

    .matrix-table td {
        padding: 8px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: center;
    }

    .matrix-table td:first-child {
        text-align: left;
        color: var(--text-muted);
        font-weight: 600;
        position: sticky;
        left: 0;
        background: rgba(20, 22, 26, 0.95);
        z-index: 1;
        border-right: 1px solid var(--border-glass);
    }

    .matrix-val {
        color: var(--text-main);
        font-weight: 700;
        font-family: 'Outfit', sans-serif;
    }

    .matrix-zero {
        color: rgba(255, 255, 255, 0.1);
    }

    .matrix-total-head {
        background: rgba(255, 255, 255, 0.05) !important;
        font-weight: 800;
        color: var(--text-main);
        border-left: 1px solid var(--border-glass);
    }

    .matrix-total-cell {
        background: rgba(255, 255, 255, 0.03);
        border-left: 1px solid var(--border-glass);
        font-weight: 800;
        color: var(--redcol-light) !important;
    }

    .matrix-grand-total {
        background: var(--redcol-dark);
        color: #fff !important;
        font-weight: 900;
        font-size: 0.9rem;
    }

    .total-row td {
        background: rgba(15, 17, 21, 0.8) !important;
        font-weight: 700;
        color: var(--text-main);
        border-top: 2px solid var(--border-glass);
    }

    .glass-table-compact {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.82rem;
        /* Fuente más pequeña */
        table-layout: auto;
    }

    .glass-table-compact th {
        background: rgba(15, 17, 21, 0.95);
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        padding: 10px 12px;
        position: sticky;
        top: 0;
        z-index: 10;
        border-bottom: 2px solid var(--border-glass);
        white-space: nowrap;
    }

    .glass-table-compact td {
        padding: 8px 12px;
        border-bottom: 1px solid var(--border-glass);
        color: var(--text-main);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .glass-table-compact tr:hover td {
        background: rgba(255, 255, 255, 0.05);
    }

    /* Columnas con mucho texto truncadas */
    .glass-table-compact.wrap-text td {
        white-space: normal !important;
        word-break: break-word;
        max-width: none;
    }

    .cards-grid-small {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
        margin-top: 10px;
    }

    .contractor-card {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-glass);
        border-radius: 10px;
        padding: 10px;
        font-size: 0.8rem;
    }

    .contractor-card h4 {
        font-size: 0.85rem;
        color: var(--redcol-light);
        margin-bottom: 8px;
        border-bottom: 1px solid var(--border-glass);
        padding-bottom: 4px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .contractor-location {
        margin-bottom: 8px;
    }

    .contractor-location strong {
        display: block;
        font-size: 0.75rem;
        color: var(--text-muted);
        text-transform: uppercase;
        margin-top: 5px;
    }

    .contractor-op-row {
        display: flex;
        justify-content: space-between;
        padding: 2px 0;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    }

    .contractor-op-row:last-child {
        border-bottom: none;
    }

    .glass-table-compact td.col-wide {
        min-width: 250px;
        white-space: normal;
        word-break: break-all;
        /* Para hosts de zabbix largos sin espacios */
    }

    .badge {
        padding: 5px 10px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        display: inline-block;
    }

    .status-active, .status-stock, .status-lost {
        display: inline-flex;
        align-items: center;
    }

    .status-active::before, .status-stock::before, .status-lost::before {
        content: "";
        display: inline-block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin-right: 8px;
        animation: pulseGlow 2s infinite;
    }

    .status-active {
        background: rgba(46, 125, 50, 0.2);
        color: #81c784;
        border: 1px solid rgba(46, 125, 50, 0.5);
    }

    .status-active::before {
        background: #10b981;
        box-shadow: 0 0 10px #10b981;
    }

    .status-stock {
        background: rgba(237, 108, 2, 0.2);
        color: #ffb74d;
        border: 1px solid rgba(237, 108, 2, 0.5);
    }

    .status-stock::before {
        background: #f59e0b;
        box-shadow: 0 0 10px #f59e0b;
    }

    .status-lost {
        background: rgba(211, 47, 47, 0.2);
        color: #e57373;
        border: 1px solid rgba(211, 47, 47, 0.5);
    }

    .status-lost::before {
        background: #ef4444;
        box-shadow: 0 0 10px #ef4444;
    }

    /* Forms Grid */
    .forms-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        margin-top: 20px;
    }

    .form-panel {
        padding: 30px;
    }

    .glass-fieldset {
        border: 1px solid var(--border-glass);
        padding: 20px;
        border-radius: 12px;
    }

    .glass-fieldset legend {
        padding: 0 10px;
        font-weight: 600;
        color: var(--accent);
        font-family: 'Outfit', sans-serif;
    }

    /* Radio Boxes for Sway */
    .radio-boxes {
        display: flex;
        gap: 15px;
    }

    .radio-box {
        flex: 1;
        position: relative;
        cursor: pointer;
    }

    .radio-box input {
        display: none;
    }

    .radio-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 15px;
        border: 1px solid var(--border-glass);
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.2);
        transition: all 0.2s;
        text-align: center;
    }

    .radio-content i {
        font-size: 1.5rem;
        color: var(--text-muted);
    }

    .radio-content span {
        font-size: 0.85rem;
        font-weight: 500;
    }

    .radio-box input:checked+.radio-content {
        border-color: var(--redcol);
        background: rgba(192, 0, 0, 0.1);
    }

    .radio-box input:checked+.radio-content i {
        color: var(--redcol-light);
    }

    /* Instructions */
    .instructions {
        padding: 25px;
    }

    .instructions h3 {
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .steps-list {
        list-style: none;
    }

    .steps-list li {
        margin-bottom: 15px;
        font-size: 0.95rem;
        line-height: 1.5;
        padding-bottom: 15px;
        border-bottom: 1px solid var(--border-glass);
    }

    .steps-list li:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .steps-list strong {
        color: var(--redcol-light);
        font-size: 1.1rem;
        margin-right: 5px;
    }

    /* Modals */
    .glass-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 17, 21, 0.8);
        backdrop-filter: blur(5px);
        z-index: 1000;
        display: none;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .glass-modal.active {
        display: flex;
        opacity: 1;
    }

    .modal-content {
        padding: 30px;
        width: 100%;
        max-width: 450px;
        position: relative;
        transform: scale(0.95);
        transition: transform 0.3s;
        animation: modalPop 0.3s forwards;
    }

    @keyframes modalPop {
        to {
            transform: scale(1);
        }
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .btn-close-modal {
        background: transparent;
        border: none;
        color: var(--text-muted);
        font-size: 1.5rem;
        cursor: pointer;
        transition: color 0.2s;
    }

    .btn-close-modal:hover {
        color: var(--accent);
    }

    .modal-footer {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }

    /* Toasts */
    .toast-container {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 10000;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .toast {
        background: var(--bg-glass);
        backdrop-filter: var(--blur);
        border: 1px solid var(--border-glass);
        padding: 15px 20px;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        gap: 12px;
        transform: translateX(120%);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .toast.show {
        transform: translateX(0);
    }

    .toast i {
        font-size: 1.5rem;
    }

    .toast-success {
        border-left: 4px solid var(--success);
    }

    .toast-success i {
        color: var(--success);
    }

    .toast-error {
        border-left: 4px solid var(--error);
    }

    .toast-error i {
        color: var(--error);
    }

    /* --- OPTIMIZACIÓN MÓVIL (Breakpoint 768px) --- */
    @media (max-width: 768px) {
      /* 1. Reset de Estructura */
      .view-container {
        flex-direction: column !important;
      }

      .main-content {
        padding: 15px !important;
        height: auto !important;
        overflow-x: hidden !important;
        min-width: 0;
      }

      /* 2. Sidebar como Menú Flotante */
      .glass-sidebar {
        position: fixed !important;
        left: -100% !important; /* Escondido por defecto */
        top: 0;
        z-index: 9999 !important;
        width: 80% !important;
        height: 100vh !important;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border-radius: 0 20px 20px 0 !important;
      }

      .glass-sidebar.active {
        left: 0 !important;
        box-shadow: 20px 0 50px rgba(0,0,0,0.8) !important;
      }
      
      .glass-sidebar.manual-active {
        left: 0 !important;
      }

      /* 3. Grids a una sola columna */
      [class*="grid"], .forms-grid, .dash-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
      }

      /* 3.1. Correcciones de anchos en formularios (MCM Swap) */
      .w-20, .w-25, .w-33, .w-35, .w-40, .w-50, .w-60, .w-80 {
        width: 100% !important;
      }
      
      .form-row {
        flex-direction: column !important;
        gap: 10px !important;
      }

      /* 3.2. Botones e info de SIM Card (Mobile) */
      .sim-info-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
      }
      
      .sim-pills {
        text-align: left !important;
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
      }
      
      .sim-pill, .operator-val {
        word-break: break-all;
        white-space: normal !important;
      }
      
      .sim-actions-toggle {
        flex-direction: column !important;
        gap: 5px !important;
      }
      
      .sim-action-btn {
        width: 100% !important;
        margin: 2px 0 !important;
        padding: 10px !important;
      }

      /* 4. Tablas con scroll lateral seguro */
      [class*="table-container"], .table-responsive, .table-container-fixed {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
      }

      /* 5. Inputs más grandes para dedos */
      input, button, select {
        height: 52px !important;
        font-size: 16px !important; /* Evita que iOS haga zoom automático */
      }

      /* 6. Header Mobile */
      .mobile-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 5px 15px;
        height: 60px;
        margin-bottom: 10px;
        border-bottom: 1px solid var(--border-glass);
        background: rgba(15, 17, 21, 0.95);
        backdrop-filter: blur(15px);
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0,0,0,0.5);
      }
      
      #btn-menu {
        width: 44px;
        height: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
      }
      
      #btn-menu i {
        font-size: 1.6rem;
      }
      
      .logo-m-container {
        display: flex;
        align-items: center;
        height: 40px;
      }
      
      .mobile-logo-img {
        max-width: 120px;
        height: auto;
        max-height: 35px;
        object-fit: contain;
      }
      
      .header-flex {
        display: none !important; /* Ocultamos cabecera desktop redundante */
      }
    }

    .btn-sync {
        background: rgba(192, 0, 0, 0.15);
        color: #ff5252;
        border: 1px solid rgba(192, 0, 0, 0.4);
        padding: 5px 12px;
        border-radius: 8px;
        font-size: 0.75rem;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .btn-sync:hover {
        background: var(--redcol);
        color: white;
        border-color: var(--redcol);
        box-shadow: 0 0 15px rgba(192, 0, 0, 0.3);
        transform: translateY(-1px);
    }

    /* Tipografía Técnica para IDs en tablas generales */
    td:first-child:not([colspan]) {
        font-family: 'JetBrains Mono', 'Roboto Mono', monospace !important;
        font-size: 0.85rem;
        letter-spacing: -0.02em;
        color: var(--accent);
    }

    /* Mejora de filas activas - Estilo SaaS */
    .status-active-row {
        background: rgba(16, 185, 129, 0.08) !important;
        border-left: 4px solid var(--success) !important;
    }
    
    .status-active-row td {
        border-bottom-color: rgba(16, 185, 129, 0.1) !important;
    }

    /* -----------------------------------------------------------
       NUCLEAR UI ALIGNMENT & CONSISTENCY (Phase 26.6)
       ----------------------------------------------------------- */

    /* 1. SEPARACIÓN DE TÍTULOS Y CABECERAS */
    [id*="view"] > div:first-child, 
    .header-flex, 
    .view-header,
    [class*="title-container"] {
      margin-bottom: 50px !important;
      padding-bottom: 15px !important;
      border-bottom: 1px solid rgba(255,255,255,0.1) !important;
      display: block !important;
    }

    /* 2. ALINEACIÓN SIMÉTRICA DE BUSCADORES Y BOTONES */
    .input-group, 
    [class*="lookup"], 
    .controls-flex,
    .sim-stock-lookup {
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important; /* Alineación central perfecta */
      gap: 12px !important;
      flex-wrap: nowrap !important;
      margin-bottom: 20px !important;
    }

    /* Forzamos altura idéntica y reseteo de márgenes */
    .controls-flex input, 
    [class*="lookup"] input,
    .sim-stock-lookup input,
    #act-search-id,
    #swap-search-id,
    .controls-flex button,
    [class*="lookup"] button,
    .sim-stock-lookup .btn-icon {
      height: 46px !important;
      box-sizing: border-box !important;
      margin: 0 !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
    }

    /* 3. RESET DE INPUTS (Evitar el fondo negro/blanco invasivo) */
    input:-webkit-autofill,
    input:-webkit-autofill:hover, 
    input:-webkit-autofill:focus,
    input:not([type="checkbox"]), select, textarea {
      -webkit-text-fill-color: white !important;
      -webkit-box-shadow: 0 0 0px 1000px #1a1c23 inset !important;
      background-color: rgba(0, 0, 0, 0.3) !important;
      color: #ffffff !important;
      font-weight: 500 !important;
      border: 1px solid rgba(255,255,255,0.1) !important;
      padding: 12px !important;
      border-radius: 8px !important;
      box-sizing: border-box !important;
    }

    /* --- 1. PLACEHOLDERS: GRIS CENIZA (NO BLANCOS) --- */
    ::-webkit-input-placeholder { color: #777777 !important; -webkit-text-fill-color: #777777 !important; opacity: 1 !important; }
    ::-moz-placeholder { color: #777777 !important; opacity: 1 !important; }
    :-ms-input-placeholder { color: #777777 !important; opacity: 1 !important; }
    ::placeholder { color: #777777 !important; opacity: 1 !important; }

    /* Asegurar que el texto que escribe el usuario sea blanco */
    input:focus:not(:placeholder-shown),
    textarea:focus:not(:placeholder-shown),
    input:not(:placeholder-shown),
    input:not([type="checkbox"]):not(:placeholder-shown) {
      color: #ffffff !important;
      -webkit-text-fill-color: #ffffff !important;
    }

    /* Asegurar que el texto que escribe el usuario sea blanco */
    input:focus:not(:placeholder-shown),
    textarea:focus:not(:placeholder-shown),
    input:not(:placeholder-shown) {
      color: #ffffff !important;
      -webkit-text-fill-color: #ffffff !important;
    }

    /* RESTAURACIÓN DE CHECKBOX (image_32.png) */
    input[type="checkbox"] {
      -webkit-appearance: none !important;
      appearance: none !important;
      width: 20px !important;
      height: 20px !important;
      background-color: rgba(255, 255, 255, 0.05) !important;
      border: 1px solid rgba(255, 255, 255, 0.1) !important;
      border-radius: 4px !important;
      cursor: pointer !important;
      position: relative !important;
      margin-right: 12px !important;
      transition: all 0.2s ease;
      display: inline-block !important;
    }

    input[type="checkbox"]:checked {
      background-color: var(--accent-red) !important;
      border-color: var(--accent-red) !important;
      box-shadow: 0 0 10px var(--accent-glow) !important;
    }

    input[type="checkbox"]:checked::after {
      content: "✔" !important;
      font-size: 14px !important;
      color: white !important;
      position: absolute !important;
      top: -1px !important;
      left: 3px !important;
    }

    .checkbox-container {
      display: flex;
      align-items: center;
      margin-top: 20px;
    }

    /* --- 2. LOGIN: RESCATE DE ICONOS --- */
    .login-box .input-group i, 
    .login-box .input-with-icon i {
      position: absolute !important;
      left: 15px !important;
      top: 50% !important;
      transform: translateY(-50%) !important;
      display: block !important;
      opacity: 0.6 !important; /* Tenue pero visible */
      color: white !important;
      z-index: 10 !important;
      transition: none !important; /* Mata la animación que los mueve */
    }

    .login-box input {
      padding-left: 50px !important; /* Espacio de seguridad */
      text-align: left !important;
      padding-top: 12px !important;
      padding-bottom: 12px !important;
      padding-right: 15px !important;
      color: #ffffff !important;
      font-weight: 500 !important;
      position: relative !important;
      z-index: 2 !important;
      background: transparent !important;
      border: none !important;
    }

    /* Evitar que el texto se mueva o cambie al hacer click */
    .login-box input:focus {
      padding-left: 50px !important;
      outline: none !important;
    }

    /* --- 3. ALINEACIÓN GENERAL --- */
    [class*="lookup"] {
      display: flex !important;
      align-items: center !important;
      gap: 10px !important;
    }
    .nav-item {
      margin-bottom: 10px !important;
      display: flex;
      align-items: center !important;
    }

    .view-title {
      margin: 0 0 5px 0 !important;
    }

    .view-subtitle {
      margin: 0 !important;
    }

    /* animations for high-fidelity effects */
    @keyframes meshRotate {
        0% { transform: scale(1); }
        100% { transform: scale(1.2) rotate(5deg); }
    }

    @keyframes pulseGlow {
        0% { opacity: 0.5; transform: scale(0.9); }
        50% { opacity: 1; transform: scale(1.1); }
        100% { opacity: 0.5; transform: scale(0.9); }
    }
    /* -------------------------------------
     * SWAP MCM REDESIGN
     * ------------------------------------- */
    .sim-actions-toggle {
        display: flex;
        gap: 8px;
        margin-top: 10px;
    }
    .sim-action-btn {
        flex: 1;
        padding: 5px 8px;
        font-size: 0.75rem;
        font-weight: 700;
        text-align: center;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .sim-action-btn:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    .sim-action-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }
    .sim-action-btn.active {
        background: var(--redcol);
        color: #fff;
        border-color: #ff4d4d;
        box-shadow: 0 0 10px rgba(255, 59, 48, 0.4);
    }
    .sim-detail-box {
        margin-top: 10px;
        font-size: 0.8rem;
        background: rgba(0, 0, 0, 0.3);
        border-left: 3px solid var(--redcol);
        padding: 8px 12px;
        border-radius: 4px;
        color: #ddd;
    }
    .sim-detail-box strong {
        color: #fff;
    }

    /* -------------------------------------
     * GENERIC RADIO OPTIONS
     * ------------------------------------- */
    .radio-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .radio-group.horizontal {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .radio-option {
        display: flex !important;
        align-items: center;
        gap: 8px;
        margin-bottom: 0 !important;
        cursor: pointer;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255,255,255, 0.1);
        border-radius: 6px;
        transition: all 0.2s;
    }
    .radio-option:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255,255,255, 0.2);
    }
    .radio-option input[type="radio"] {
        width: auto !important;
        margin: 0 !important;
        cursor: pointer;
        accent-color: var(--redcol);
    }
    .radio-option:has(input:checked) {
        background: rgba(192, 0, 0, 0.15) !important;
        border-color: var(--redcol) !important;
        box-shadow: 0 0 10px rgba(192, 0, 0, 0.3) !important;
    }

    /* RBAC & Portada Styles */
    .mode-selector-container {
        display: flex;
        gap: 30px;
        justify-content: center;
        align-items: center;
        height: 100%;
        padding: 40px;
        flex-wrap: wrap;
    }
    .mode-card {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(12px);
    }
    .mode-card h2 {
        font-family: 'Outfit', sans-serif;
        font-size: 1.8rem;
        margin-bottom: 10px;
        color: #fff;
    }
    .mode-card p {
        color: var(--text-muted);
        font-size: 0.95rem;
        line-height: 1.4;
    }
    .mode-card::before {
        content: '';
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background: radial-gradient(circle at center, rgba(192, 0, 0, 0.1), transparent);
        opacity: 0;
        transition: opacity 0.4s;
    }
    .mode-card:hover::before {
        opacity: 1;
    }

    /* Visiblity Classes */
    .hidden-by-mode, .hidden-by-role {
        display: none !important;
    }

    /* RBAC CSS-Based Visibility */
    .admin-only-option {
        display: none !important;
    }

    body.user-is-admin .admin-only-option,
    body.user-is-internal .admin-only-option {
        display: block !important;
    }

    /* Ocultar campos específicos para externos */
    body.user-is-external .internal-only-field {
        display: none !important;
    }

    /* Mostrar campos específicos para externos */
    .contractor-only {
        display: none !important;
    }
    body.user-is-external .contractor-only {
        display: block !important;
    }
    /* Dashboard Utility Classes */
    .bg-soft-red { background-color: rgba(230, 57, 70, 0.15) !important; }
    .bg-soft-cyan { background-color: rgba(0, 204, 255, 0.15) !important; }
    .border-l-3 { border-left-width: 3px !important; border-left-style: solid !important; }
    .mt-2 { margin-top: 0.5rem !important; }

    /* Indicador de Sincronización (Wi-Fi Style sobre Logo) */
    .sync-indicator {
        position: absolute;
        top: -6px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(230, 57, 70, 0.95);
        padding: 3px 10px;
        border-radius: 20px;
        color: white;
        display: none;
        align-items: center;
        gap: 6px;
        font-size: 0.65rem;
        font-weight: 800;
        z-index: 100;
        box-shadow: 0 0 15px rgba(230, 57, 70, 0.6);
        pointer-events: none;
        letter-spacing: 0.8px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
        text-transform: uppercase;
    }

    .sync-indicator.active {
        display: flex;
        animation: wifiReveal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }

    .sync-indicator i {
        font-size: 0.9rem;
        animation: wifi-searching 1.2s ease-in-out infinite;
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }

    .sync-indicator span {
        white-space: nowrap;
    }

    @keyframes wifi-searching {
        0% { opacity: 0.4; transform: scale(0.9); }
        50% { opacity: 1; transform: scale(1.1); }
        100% { opacity: 0.4; transform: scale(0.9); }
    }

    @keyframes wifiReveal {
        from { opacity: 0; transform: translateX(-50%) translateY(10px); }
        to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }

    /* Custom SweetAlert styling for REDcol theme */
    .swal2-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        width: 100vw !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        z-index: 10000 !important;
        padding: 0 !important;
    }
    
    .swal-redcol-popup {
        background: rgba(15, 17, 21, 0.96) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 1px solid var(--accent-red) !important;
        border-radius: 16px !important;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(230, 57, 70, 0.15) !important;
        padding: 2.5em 2em !important;
        max-width: 450px !important;
    }
    
    .swal-redcol-title {
        color: var(--success) !important;
        font-family: 'Outfit', sans-serif !important;
        font-size: 2rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 0.5em !important;
    }
    
    .swal-redcol-html {
        color: var(--text-main) !important;
        font-size: 1.1rem !important;
        opacity: 0.9;
    }
    
    .swal-redcol-icon {
        border-color: var(--success) !important;
        color: var(--success) !important;
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.15) !important;
        margin-top: 0 !important;
    }
    
    .swal-redcol-icon .swal2-success-ring {
        border-color: rgba(16, 185, 129, 0.3) !important;
    }
    
    .swal-redcol-icon .swal2-success-line-tip,
    .swal-redcol-icon .swal2-success-line-long {
        background-color: var(--success) !important;
    }
    
    .swal-redcol-confirm {
        background: linear-gradient(135deg, var(--success), #059669) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 12px 35px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        font-family: 'Outfit', sans-serif !important;
        box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3) !important;
        transition: transform 0.2s, box-shadow 0.2s !important;
        margin-top: 1.5em !important;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .swal-redcol-confirm:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5) !important;
    }

    /* MODULO: ACTIVIDADES & CALENDARIO */
    .calendar-layout-grid {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 20px;
        min-height: 600px;
    }

    .calendar-sidebar-stats {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .section-title {
        font-size: 0.85rem;
        color: var(--text-muted);
        letter-spacing: 1px;
        margin-bottom: 15px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .stats-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .stat-row-act {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        background: rgba(255,255,255,0.03);
        border-radius: 8px;
        font-size: 0.9rem;
    }

    .stat-row-act .count-badge {
        background: var(--accent-red);
        color: white;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 700;
    }

    .calendar-main-view {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .calendar-header-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin-bottom: 10px;
    }

    .modern-calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 10px;
        flex-grow: 1;
    }

    .calendar-day-header {
        text-align: center;
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.75rem;
        padding: 5px;
        text-transform: uppercase;
    }

    .calendar-day {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        min-height: 100px;
        padding: 8px;
        display: flex;
        flex-direction: column;
        gap: 5px;
        transition: all 0.2s;
        position: relative;
    }

    .calendar-day:hover {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .calendar-day.today {
        border-color: var(--accent-red);
        background: rgba(230, 57, 70, 0.05);
    }

    .calendar-day-num {
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--text-muted);
        text-align: right;
        margin-bottom: 5px;
    }

    .event-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
        border-radius: 4px;
        background: var(--accent-red);
        color: white;
        cursor: pointer;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: transform 0.1s;
        border-left: 3px solid rgba(0,0,0,0.2);
    }

    .event-badge:hover {
        transform: scale(1.03);
        filter: brightness(1.2);
    }

    .event-badge.state-pendiente { border-left-color: #ff9800; }
    .event-badge.state-asignado { border-left-color: #2196f3; }
    .event-badge.state-finalizado { border-left-color: #4caf50; opacity: 0.6; }

    /* Estilos color empresa */
    .bg-lsynet { background-color: #d32f2f !important; }
    .bg-camred { background-color: #0288d1 !important; }
    .bg-tglobal { background-color: #1976d2 !important; }
    .bg-quidata { background-color: #7b1fa2 !important; }
    .bg-cismen { background-color: #388e3c !important; }
    .bg-hvsoluciones { background-color: #e64a19 !important; }

    /* Mobile Actividades */
    @media (max-width: 900px) {
        .calendar-layout-grid {
            grid-template-columns: 1fr;
        }
        .calendar-sidebar-stats {
            order: 2;
        }
        .modern-calendar-grid {
            gap: 5px;
        }
        .calendar-day {
            min-height: 70px;
            padding: 4px;
        }
    }

    .glass-hr {
        border: none;
        height: 1px;
        background: rgba(255, 255, 255, 0.08);
        margin: 20px 0;
    }

    .max-w-800 { max-width: 800px; }
    .mx-auto { margin-left: auto; margin-right: auto; }

    .detalle-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .detalle-item {
        margin-bottom: 15px;
    }

    .detalle-label {
        font-size: 0.75rem;
        color: var(--text-muted);
        text-transform: uppercase;
        display: block;
        margin-bottom: 4px;
    }

    .detalle-val {
        font-size: 1rem;
        font-weight: 500;
        color: var(--accent);
    }

    .status-pill {
        display: inline-block;
        padding: 2px 10px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .pill-pendiente { background: rgba(255, 152, 0, 0.1); color: #ff9800; border: 1px solid #ff9800; }
    .pill-asignado { background: rgba(33, 150, 243, 0.1); color: #2196f3; border: 1px solid #2196f3; }
    .pill-finalizado { background: rgba(76, 175, 80, 0.1); color: #4caf50; border: 1px solid #4caf50; }

    .tech-stock-summary {
        background: rgba(16, 185, 129, 0.05);
        border: 1px solid rgba(16, 185, 129, 0.2);
        padding: 10px;
        border-radius: 8px;
        margin-top: 15px;
    }


/* REGLAS DE VISIBILIDAD DE ROLES EXTERNOS */
body.user-is-external .admin-only-field {
    display: none !important;
}
body.user-is-external .internal-only-field {
    display: none !important;
}
