:root {
    --primary-color: #0033a0; /* KONE Blue */
    --secondary-color: #00b5e2;
    --success-color: #28a745;
    --success-bg: rgba(40, 167, 69, 0.2);
    --dark-color: #1a1a1a;
    --light-color: #f4f7f6;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    color: var(--dark-color);
    min-height: 100vh;
    padding: 20px;
    font-size: 14px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden; /* Evita que toda la página tenga scroll horizontal */
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 1.6rem;
}

header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
}

.desktop-nav .nav-link {
    text-decoration: none;
    color: var(--dark-color);
    margin-left: 15px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.desktop-nav .nav-link:hover, .desktop-nav .nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Nav Dropdown for imports/syncs */
.nav-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.nav-dropdown-btn {
    background: rgba(0, 51, 160, 0.05);
    color: var(--primary-color);
    border: 1px solid rgba(0, 51, 160, 0.15);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.nav-dropdown-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 240px;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 110;
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 8px 0;
    margin-top: 8px;
    animation: fadeIn 0.2s ease-out;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.dropdown-item {
    color: var(--dark-color);
    padding: 10px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f4f7f6;
    color: var(--primary-color);
}

.dropdown-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Mobile Menu Toggle Button styling */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    padding: 0;
    z-index: 205;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Drawer (Initial state hidden offscreen) */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 32px rgba(0,0,0,0.15);
    z-index: 210;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.drawer-header h2 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.drawer-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #777;
    line-height: 1;
    transition: color 0.2s;
}

.drawer-close:hover {
    color: var(--primary-color);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.drawer-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-section .section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #777;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.drawer-link:hover, .drawer-link.active {
    background-color: rgba(0, 51, 160, 0.08);
    color: var(--primary-color);
}

.drawer-link.active {
    background-color: var(--primary-color);
    color: white;
}

.drawer-link .icon {
    font-size: 1.1rem;
}

.drawer-link.action-link {
    font-weight: 500;
    font-size: 0.9rem;
}

.drawer-link .badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* Backdrop */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.4);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

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

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

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

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

.table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    overflow: auto;
    max-height: calc(100vh - 215px);
    padding: 20px;
    width: 100%;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

th {
    position: sticky;
    top: -20px;
    z-index: 10;
    background: #ffffff;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: inset 0 -2px 0 var(--primary-color);
}

tr {
    transition: background-color 0.3s ease;
}

tr:hover {
    background: rgba(0,0,0,0.02);
}

/* Green highlight for completed */
tr.completed {
    background-color: var(--success-bg);
}

tr.completed:hover {
    background-color: rgba(40, 167, 69, 0.3);
}

input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 51, 160, 0.2);
}

.btn-save {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-save:hover {
    background: #002277;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 13px;
    }

    header {
        position: sticky;
        top: 0;
        padding: 12px 20px;
        margin-bottom: 15px;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }

    /* Mobile menu active state for hamburger animation */
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filters {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .filters input[type="text"] {
        width: 100% !important; /* Override inline width styles */
        margin-right: 0 !important; /* Remove margin spacing */
        height: 38px;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 0.9rem;
    }

    .table-container {
        padding: 10px;
        max-height: calc(100vh - 280px);
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 0.9em;
    }

    th, td {
        padding: 8px 10px;
    }
}

/* Refresh Button Styles */
.refresh-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.2s ease;
    color: var(--primary-color);
    margin-left: 5px;
    outline: none;
}

.refresh-btn:hover {
    transform: rotate(180deg);
    background-color: rgba(0, 51, 160, 0.08);
}

.refresh-btn:active {
    transform: scale(0.9) rotate(180deg);
}

.refresh-btn.spinning {
    animation: spin-refresh 0.8s linear infinite;
}

@keyframes spin-refresh {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Readonly Mode */
body.readonly-mode input:not([id*="search"]):not(.search-input),
body.readonly-mode select:not([id*="search"]):not(.search-input),
body.readonly-mode textarea:not([id*="search"]):not(.search-input),
body.readonly-mode canvas {
    pointer-events: none !important;
    opacity: 0.85;
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

body.readonly-mode table button:not([onclick*="Viewer"]):not([onclick*="viewer"]):not(.toggle-btn),
body.readonly-mode button[type="submit"],
body.readonly-mode .btn-edit,
body.readonly-mode .btn-save,
body.readonly-mode .action-btn,
body.readonly-mode #btn-warehouse-reverse,
body.readonly-mode .btn-rl,
body.readonly-mode #excel-path-details,
body.readonly-mode button[onclick*="approveCredit"],
body.readonly-mode button[onclick*="fulfillReservation"],
body.readonly-mode button[onclick*="deliverReservation"],
body.readonly-mode button[onclick*="cancelFulfillment"],
body.readonly-mode button[onclick*="openDriverRLModal"],
body.readonly-mode button[onclick*="openReverseLogisticsModal"],
body.readonly-mode button[onclick*="saveExcelPath"],
body.readonly-mode button[onclick*="clear"],
body.readonly-mode .btn-warehouse-fulfill,
body.readonly-mode .btn-credit-approve,
body.readonly-mode [id*="upload-placeholder"],
body.readonly-mode [id*="placeholder"]:not([id*="preview"]):not([id*="img"]),
body.readonly-mode .modal-footer button:not(.btn-secondary):not([data-dismiss="modal"]):not(.drawer-close) {
    display: none !important;
}

.readonly-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(234, 88, 12, 0.08);
    border: 1px solid rgba(234, 88, 12, 0.2);
    color: #ea580c;
    padding: 10px;
    border-radius: 8px;
    margin: 15px auto 15px auto;
    font-weight: 600;
    font-size: 0.9rem;
    max-width: 1200px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* Layout adjustments for vertical sidebar */
@media (min-width: 992px) {
    body {
        padding-left: 90px !important;
    }
}

/* Sidebar Styles */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 70px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid var(--glass-border);
    box-shadow: 4px 0 24px rgba(0, 51, 160, 0.05);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    overflow-y: auto;
}

#sidebar:hover {
    width: 280px;
}

/* Hide text labels when collapsed, show on hover */
#sidebar .nav-text {
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    margin-left: 10px;
}

#sidebar:hover .nav-text {
    opacity: 1;
}

/* Sidebar header / Logo */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px 15px;
    border-bottom: 1px solid rgba(0, 51, 160, 0.08);
    height: 70px;
    flex-shrink: 0;
}

.sidebar-logo-text {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.15rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    margin-left: 10px;
}

#sidebar:hover .sidebar-logo-text {
    opacity: 1;
}

/* Sidebar Menu */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 15px 10px;
    gap: 5px;
    flex: 1;
}

.menu-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    padding: 10px 10px 5px 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#sidebar:hover .menu-group-title {
    opacity: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-color);
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    height: 40px;
}

.sidebar-link:hover, .sidebar-link.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-link .icon {
    font-size: 1.2rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    flex-shrink: 0;
}

/* Sidebar Dropdown */
.sidebar-dropdown {
    position: relative;
    display: flex;
    flex-direction: column;
}

.sidebar-dropdown-content {
    display: none;
    flex-direction: column;
    padding-left: 20px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin-top: 5px;
}

.sidebar-dropdown.open .sidebar-dropdown-content {
    display: flex;
}

#sidebar:not(:hover) .sidebar-dropdown-content {
    display: none !important;
}

/* Mobile Sidebar Toggle */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.mobile-sidebar-toggle:active {
    transform: scale(0.9);
}

/* Mobile Sidebar Overrides */
@media (max-width: 991px) {
    .mobile-sidebar-toggle {
        display: flex;
    }
    
    #sidebar {
        width: 280px !important;
        left: -280px;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    #sidebar.open {
        left: 0;
    }
    
    #sidebar .nav-text, #sidebar .sidebar-logo-text, #sidebar .menu-group-title {
        opacity: 1 !important;
    }
    
    body {
        padding-top: 70px !important;
        padding-left: 20px !important;
    }
}

/* --- Extracted from mb25.html --- */
/* Estilos específicos y premium para MB25 Flow */
        .mb25-tabs {
            display: flex;
            gap: 15px;
            margin-bottom: 25px;
            flex-wrap: wrap;
        }

        .tab-btn {
            padding: 12px 24px;
            border: none;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius);
            cursor: pointer;
            font-weight: 600;
            color: #555;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: inherit;
        }

        .tab-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.1);
            background: rgba(255,255,255,0.95);
        }

        .tab-btn.active {
            color: white;
            transform: translateY(0);
        }

        /* Colores temáticos para cada pestaña */
        .tab-btn[data-tab="credit"].active {
            background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
            border-color: #6a1b9a;
            box-shadow: 0 6px 20px rgba(106, 27, 154, 0.3);
        }

        .tab-btn[data-tab="warehouse"].active {
            background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
            border-color: #0d47a1;
            box-shadow: 0 6px 20px rgba(13, 71, 161, 0.3);
        }

        .tab-btn[data-tab="shortage"].active {
            background: linear-gradient(135deg, #e65100 0%, #ef6c00 100%);
            border-color: #e65100;
            box-shadow: 0 6px 20px rgba(230, 81, 0, 0.3);
        }

        .tab-btn[data-tab="fulfilled"].active {
            background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
            border-color: #2e7d32;
            box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
        }

        .badge-count {
            background: rgba(0, 0, 0, 0.15);
            color: white;
            padding: 2px 8px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 700;
        }
        
        .tab-btn:not(.active) .badge-count {
            background: #eee;
            color: #666;
        }

        #shortage-view-toggle-container .tab-btn.active {
            background: linear-gradient(135deg, #e65100 0%, #ef6c00 100%);
            border-color: #e65100;
            color: white;
            box-shadow: 0 4px 12px rgba(230, 81, 0, 0.2);
        }

        #shortage-view-toggle-container .tab-btn:not(.active) .badge-count {
            background: #eee;
            color: #666;
        }

        #shortage-view-toggle-container .tab-btn.active .badge-count {
            background: rgba(255, 255, 255, 0.25);
            color: white;
        }

        #warehouse-view-toggle-container .tab-btn.active {
            background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
            border-color: #0d47a1;
            color: white;
            box-shadow: 0 4px 12px rgba(13, 71, 161, 0.2);
        }

        #warehouse-view-toggle-container .tab-btn:not(.active) .badge-count {
            background: #eee;
            color: #666;
        }

        #warehouse-view-toggle-container .tab-btn.active .badge-count {
            background: rgba(255, 255, 255, 0.25);
            color: white;
        }

        #credit-view-toggle-container .tab-btn.active {
            background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
            border-color: #6a1b9a;
            color: white;
            box-shadow: 0 4px 12px rgba(106, 27, 154, 0.2);
        }

        #fulfilled-view-toggle-container .tab-btn.active {
            background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
            border-color: #2e7d32;
            color: white;
            box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
        }

        #fulfilled-view-toggle-container .tab-btn:not(.active) .badge-count {
            background: #eee;
            color: #666;
        }

        #fulfilled-view-toggle-container .tab-btn.active .badge-count {
            background: rgba(255, 255, 255, 0.25);
            color: white;
        }

        .reservation-card {
            background: var(--glass-bg);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-radius: var(--radius);
            border: 1px solid var(--glass-border);
            box-shadow: var(--shadow);
            margin-bottom: 20px;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .reservation-card:hover {
            box-shadow: 0 12px 40px rgba(31, 38, 135, 0.2);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .card-header {
            padding: 18px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            user-select: none;
            background: rgba(255, 255, 255, 0.4);
            border-bottom: 1px solid rgba(0,0,0,0.05);
            flex-wrap: wrap;
            gap: 15px;
        }

        .card-header-title {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .res-number {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--primary-color);
            user-select: text;
        }

        .card-header-title span {
            user-select: text;
        }

        .priority-badge {
            background: #ffebee;
            color: #c62828;
            border: 1px solid #ffcdd2;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 4px;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        .card-meta {
            display: flex;
            gap: 20px;
            color: #666;
            font-size: 0.9rem;
            margin-top: 5px;
            flex-wrap: wrap;
        }

        .card-meta span strong {
            color: #333;
        }

        .card-actions {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .total-amount {
            font-size: 1.15rem;
            font-weight: 700;
            color: #2e7d32;
            background: #e8f5e9;
            padding: 6px 12px;
            border-radius: 8px;
            border: 1px solid #c8e6c9;
        }

        .btn-action {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: white;
        }

        .btn-credit-approve {
            background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
            box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
        }

        .btn-credit-approve:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(46, 125, 50, 0.35);
        }

        .btn-warehouse-fulfill {
            background: linear-gradient(135deg, #1565c0 0%, #1e88e5 100%);
            box-shadow: 0 4px 12px rgba(21, 101, 192, 0.2);
        }

        .btn-warehouse-fulfill:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(21, 101, 192, 0.35);
        }

        .card-content {
            padding: 24px;
            background: rgba(255, 255, 255, 0.1);
            border-top: 1px solid rgba(0,0,0,0.02);
        }

        /* Tablas internas con scroll horizontal en celular */
        .items-table-container {
            overflow-x: auto;
            border-radius: 8px;
            border: 1px solid rgba(0,0,0,0.08);
            box-shadow: 0 2px 8px rgba(0,0,0,0.02);
            background: white;
        }

        .items-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
            min-width: 750px;
        }

        .items-table th {
            background: #f8f9fa;
            color: #555;
            font-weight: 700;
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.5px;
            padding: 10px 15px;
            border-bottom: 2px solid #eee;
            position: static;
            box-shadow: none;
        }

        .items-table thead tr.blue-header th {
            background: #1565c0;
            color: white;
        }

        .items-table td {
            padding: 10px 15px;
            border-bottom: 1px solid #f1f1f1;
            color: #333;
        }

        .items-table tr:last-child td {
            border-bottom: none;
        }

        .action-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 700;
            text-align: center;
        }

        .badge-create-po {
            background: #ffe0b2;
            color: #e65100;
            border: 1px solid #ffe0b2;
        }

        .badge-create-pr {
            background: #fff9c4;
            color: #f57f17;
            border: 1px solid #fff9c4;
        }

        .badge-has-pr {
            background: #e8f5e9;
            color: #2e7d32;
            border: 1px solid #c8e6c9;
        }

        .toggle-arrow {
            font-size: 0.9rem;
            color: #777;
            transition: transform 0.3s;
            margin-left: 10px;
        }

        .reservation-card.collapsed .card-content {
            display: none;
        }

        .reservation-card.collapsed .toggle-arrow {
            transform: rotate(-90deg);
        }
        
        .loading-container {
            text-align: center;
            padding: 40px;
            background: var(--glass-bg);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            border: 1px solid var(--glass-border);
            color: #666;
            font-size: 1.1rem;
        }
        
        .spinner {
            border: 4px solid rgba(0,0,0,0.1);
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border-left-color: var(--primary-color);
            animation: spin 1s linear infinite;
            margin: 0 auto 15px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes modalIn {
            from { opacity: 0; transform: scale(0.9) translateY(20px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        .reservation-card.reservation-card-fulfillable {
            border: 2px solid rgba(46, 125, 50, 0.45) !important;
            background: rgba(232, 245, 233, 0.65) !important;
            box-shadow: 0 4px 15px rgba(46, 125, 50, 0.15) !important;
        }
        .reservation-card.reservation-card-fulfillable:hover {
            border-color: rgba(46, 125, 50, 0.8) !important;
            box-shadow: 0 12px 40px rgba(46, 125, 50, 0.3) !important;
        }
