@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #080c16;
    --bg-secondary: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.4);
    --border-color: rgba(255, 255, 255, 0.06);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --primary: #6366f1; /* Violeta */
    --primary-hover: #4f46e5;
    
    --success: #10b981; /* Esmeralda */
    --success-bg: rgba(16, 185, 129, 0.12);
    
    --warning: #f59e0b; /* Ambar */
    --warning-bg: rgba(245, 158, 11, 0.12);
    
    --danger: #ef4444; /* Rojo */
    --danger-bg: rgba(239, 68, 68, 0.12);
    
    --info: #0ea5e9; /* Celeste */
    --info-bg: rgba(14, 165, 233, 0.12);
    
    --sidebar-width: 250px;
    --shadow-main: 0 8px 30px rgba(0, 0, 0, 0.4);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 40%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Scrollbar Personalizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* SIDEBAR NAVEGACIÓN */
.sidebar {
    width: var(--sidebar-width);
    background: #0b1120;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-logo {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo h2 {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.925rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-item.active a,
.sidebar-item a:hover {
    color: var(--text-main);
    background: rgba(99, 102, 241, 0.08);
}

.sidebar-item.active a {
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* CONTENIDO PRINCIPAL */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    min-height: 100vh;
}

/* TOPBAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.topbar-title h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.topbar-title p {
    font-size: 0.825rem;
    color: var(--text-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* VISTAS */
.view-panel {
    display: none;
    animation: fadeIn 0.2s ease;
}

.view-panel.active {
    display: block;
}

/* METRICAS GRID DUAL-CURRENCY */
.metrics-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--primary);
    padding-left: 0.5rem;
}

.metrics-grid-currency {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-main);
}

.metric-card .info p {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.metric-card .info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.metric-card .icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.metric-usd .icon-wrapper {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success);
}
.metric-ars .icon-wrapper {
    background: rgba(14, 165, 233, 0.08);
    color: var(--info);
}

/* DESTACADOS DE COMISIÓN */
.metric-card.metric-highlight {
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.45) 0%, rgba(245, 158, 11, 0.05) 100%);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.05);
}
.metric-card.metric-highlight-pending {
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.45) 0%, rgba(239, 68, 68, 0.05) 100%);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.05);
}

/* SECCION HEADER ACTIONS */
.section-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem 0.6rem 2.25rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.875rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* TOGGLE DE VISTAS (CRM) */
.view-toggle {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    padding: 0.25rem;
    border-radius: 8px;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-btn.active {
    background: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

/* BOTONES */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: rgba(255, 255, 255, 0.04); border-color: var(--border-color); color: var(--text-main); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }
.btn-success { background: var(--success-bg); border-color: rgba(16, 185, 129, 0.15); color: var(--success); }
.btn-success:hover { background: rgba(16, 185, 129, 0.22); }
.btn-danger { background: var(--danger-bg); border-color: rgba(239, 68, 68, 0.15); color: var(--danger); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.22); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.775rem; border-radius: 6px; }

/* TABLAS Y WRAPPERS */
.table-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow-x: auto;
    box-shadow: var(--shadow-main);
    margin-bottom: 2rem;
}

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

th {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.725rem;
    letter-spacing: 0.5px;
}

td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.01); }

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.725rem;
    letter-spacing: 0.25px;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: rgba(99, 102, 241, 0.1); color: var(--primary); }

/* TAGS DEL CRM */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.crm-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
}

/* KANBAN BOARD */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 2rem;
}

.kanban-column {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
    min-height: 450px;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.kanban-column-header h4 {
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kanban-column-header .count-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.45rem;
    font-size: 0.7rem;
    border-radius: 5px;
    font-weight: 600;
}

.kanban-cards-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 400px;
}

.kanban-card {
    background: #131b2e;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
    cursor: grab;
    transition: var(--transition);
}

.kanban-card:active { cursor: grabbing; }
.kanban-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.kanban-card .card-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kanban-card .card-product {
    font-size: 0.75rem;
    color: var(--info);
    font-weight: 600;
}

.kanban-card .card-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.5rem;
}

.kanban-card .card-footer-actions {
    display: flex;
    gap: 0.35rem;
}

/* MODALES */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 6, 14, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-content {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    padding: 1.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.96);
    transition: var(--transition);
}
.modal-backdrop.open .modal-content { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-header h3 { font-size: 1.15rem; font-weight: 700; }
.modal-close { background: transparent; border: none; color: var(--text-muted); font-size: 1.35rem; cursor: pointer; }
.modal-close:hover { color: var(--text-main); }

/* FORMULARIOS */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.875rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; border-top: 1px solid var(--border-color); padding-top: 1rem; }

/* DISEÑO DOS COLUMNAS PARA CIERRES Y REPORTES */
.settlement-modal-layout {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}
.settlement-info-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.settlement-report-column {
    display: flex;
    flex-direction: column;
}

/* TOASTS */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1100; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
    background: #1e293b;
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    padding: 0.65rem 1.1rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    font-size: 0.825rem;
    animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 320px;
}
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

/* PERSISTENCIA INDICADOR */
.persistence-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}
.persistence-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }
.persistence-dot.connected { background: var(--success); box-shadow: 0 0 6px var(--success); }
.persistence-dot.local { background: var(--warning); box-shadow: 0 0 6px var(--warning); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.menu-toggle-btn {
    display: none;
}
.sidebar-backdrop {
    display: none;
}

/* RESPONSIVE EXPERTO EN UX/UI MÓVIL Y TABLET (HASTA 1024PX) */
@media (max-width: 1024px) {
    /* 1. NAVEGACIÓN MÓVIL ESTILO CAJÓN DESLIZABLE (DRAWER) CON BOTÓN HAMBURGUESA */
    .menu-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--border-color);
        color: var(--text-main);
        width: 42px;
        height: 42px;
        border-radius: 8px;
        font-size: 1.25rem;
        cursor: pointer;
        transition: var(--transition);
        margin-right: 0.75rem;
        flex-shrink: 0;
    }
    
    .menu-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 270px;
        height: 100vh;
        background: var(--bg-primary);
        border-right: 1px solid var(--border-color);
        border-top: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 1rem 0;
        z-index: 1200;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-logo {
        display: block !important;
        padding: 1.5rem 1.5rem 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 1rem;
    }

    .sidebar-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        justify-content: flex-start;
        padding: 0 1rem !important;
        margin: 0;
        gap: 0.5rem;
    }

    .sidebar-item {
        flex: none;
        height: auto;
        width: 100%;
    }

    .sidebar-item a {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 0.85rem;
        font-size: 0.875rem;
        height: auto;
        padding: 0.85rem 1.25rem;
        border-radius: 8px;
        color: var(--text-muted);
        background: transparent !important;
        box-shadow: none !important;
        width: 100%;
    }

    .sidebar-item.active a {
        color: var(--text-main);
        background: var(--primary-gradient) !important;
        box-shadow: var(--shadow-primary) !important;
    }

    .sidebar-item a i {
        font-size: 1.1rem;
        margin: 0;
    }

    .sidebar-footer {
        display: block !important;
        padding: 1.5rem;
        margin-top: auto;
        border-top: 1px solid var(--border-color);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 15, 30, 0.75);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1150;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .sidebar-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Ajustar Contenedor Principal */
    .main-content {
        margin-left: 0 !important;
        padding: 1rem 1rem 2rem 1rem !important; /* Reset bottom spacing since bottom bar is gone */
    }

    .topbar {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        margin-bottom: 1.25rem;
        width: 100%;
    }

    .topbar-title {
        flex: 1;
    }

    .topbar-title h1 {
        font-size: 1.5rem;
        margin: 0;
    }

    .topbar-title p {
        display: none; /* Ocultar subtítulo para ahorrar espacio */
    }

    .topbar-actions {
        display: flex;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .topbar-actions .btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
    }

    /* 2. TABLERO KANBAN SWIPEABLE (TIPO TRELLO EN MÓVIL) */
    .kanban-board {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
    }

    .kanban-column {
        flex: 0 0 85%; /* Las columnas ocupan el 85% para poder asomar el inicio de la siguiente */
        scroll-snap-align: center;
        min-height: 480px;
    }

    /* 3. TRANSFORMACIÓN DE TABLAS RIGIDAS A TARJETAS FLUIDAS */
    .table-wrapper {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow-x: visible !important;
    }

    table, thead, tbody, th, td, tr {
        display: block;
        width: 100% !important;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 0.5rem 1rem;
        box-shadow: var(--shadow-main);
    }

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

    tr:hover td {
        background: transparent !important;
    }

    td {
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        position: relative;
        padding: 0.75rem 0.5rem 0.75rem 40% !important;
        text-align: right;
        font-size: 0.85rem;
        min-height: 2.75rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        box-sizing: border-box;
        white-space: normal;
        word-break: break-word;
    }

    td:last-child {
        border-bottom: none;
    }

    td:before {
        position: absolute;
        left: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 38%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 700;
        color: var(--text-muted);
        content: attr(data-label);
        font-size: 0.725rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        pointer-events: none;
    }

    /* Evitar que las filas vacías de error/mensaje se rompan en móvil */
    td[colspan] {
        padding: 2rem 1rem !important;
        text-align: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: auto !important;
        display: block !important;
    }
    
    td[colspan]:before {
        display: none !important;
    }

    /* Alinear botones de acciones centrado a la derecha */
    td div {
        justify-content: flex-end !important;
        width: 100%;
    }

    .settlement-modal-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* 4. MODALES ESTILO BOTTOM SHEET EN MÓVIL (DESLIZAN DESDE ABAJO) */
    .modal-backdrop {
        align-items: flex-end;
    }

    .modal-content {
        width: 100% !important;
        max-width: none !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 1.25rem;
        transform: translateY(100%) !important;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .modal-backdrop.open .modal-content {
        transform: translateY(0) !important;
    }

    .modal-footer {
        margin-top: 1.25rem;
        padding-top: 0.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .metrics-grid-currency {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .metric-card {
        padding: 1rem;
    }

    .metric-card .info h2 {
        font-size: 1.35rem;
    }

    .section-header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .filter-actions > * {
        flex: 1 1 auto;
    }

    .search-box {
        max-width: none;
    }
}
