﻿
/* ============================================
           PAGE CONTAINER
           ============================================ */
.page-productos {
    padding: 24px 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.5px;
}

    .page-title span {
        color: #38bdf8;
    }

.page-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Botón Nuevo Producto */
.btn-nuevo {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.25);
}

    .btn-nuevo:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
    }

    .btn-nuevo:active {
        transform: translateY(0);
    }

    .btn-nuevo img {
        width: 20px;
        height: 20px;
        filter: brightness(0) invert(1);
    }

/* ============================================
           STATS CARDS
           ============================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

    .stat-card:hover {
        border-color: rgba(56, 189, 248, 0.1);
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

    .stat-icon.blue {
        background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(56, 189, 248, 0.05));
        color: #38bdf8;
        box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
    }

    .stat-icon.green {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
        color: #22c55e;
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.15);
    }

    .stat-icon.rose {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
        color: #ef4444;
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
    }

.stat-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    line-height: 1;
}

.stat-info p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 4px 0 0 0;
}

/* ============================================
           GRID CONTAINER PREMIUM
           ============================================ */
.grid-wrapper {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

/* ============================================
           DEVEXPRESS GRID v26.1 - TEMA PREMIUM
           ============================================ */
.dx-datagrid {
    background: transparent !important;
    border: none !important;
    font-family: 'Segoe UI', system-ui, sans-serif !important;
}

/* Header */
.dx-datagrid-headers {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
    border-bottom: 2px solid rgba(56, 189, 248, 0.2) !important;
    border-radius: 10px 10px 0 0 !important;
}

    .dx-datagrid-headers .dx-header-row > td {
        background: transparent !important;
        color: #94a3b8 !important;
        font-weight: 700 !important;
        font-size: 0.75rem !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        padding: 16px 18px !important;
        border: none !important;
    }

        .dx-datagrid-headers .dx-header-row > td:hover {
            color: #38bdf8 !important;
        }


/* Filas */
.dx-datagrid-rowsview {
    background: transparent !important;
    border-radius: 0 0 10px 10px !important;
}

    .dx-datagrid-rowsview .dx-row {
        background: rgba(30, 41, 59, 0.25) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
        transition: all 0.2s ease !important;
    }

        .dx-datagrid-rowsview .dx-row:hover {
            background: rgba(56, 189, 248, 0.06) !important;
            border-bottom: 1px solid rgba(56, 189, 248, 0.1) !important;
        }

        .dx-datagrid-rowsview .dx-row:nth-child(even) {
            background: rgba(15, 23, 42, 0.35) !important;
        }

            .dx-datagrid-rowsview .dx-row:nth-child(even):hover {
                background: rgba(56, 189, 248, 0.06) !important;
            }

        /* 🔹 REGLA REESTRUCTURADA: Forzado profundo a todo texto dentro de la celda */
        .dx-datagrid-rowsview .dx-row > td,
        .dx-datagrid-rowsview .dx-row > td *,
        .dx-datagrid-rowsview .dx-data-row td,
        .dx-datagrid-rowsview .dx-cell-focus-disabled,
        .dx-datagrid-rowsview .dx-cell-focus-disabled * {
            color: #ffffff !important; /* 🌟 Blanco brillante garantizado para todos los textos */
            font-size: 0.9rem !important;
            padding: 8px 12px !important; /* Aprovechamos a compactar para que no se vea tosco */
            border: none !important;
            vertical-align: middle !important;
            opacity: 1 !important; /* Cancela cualquier atenuación grisácea de DevExpress */
        }

        /* Fila seleccionada */
        .dx-datagrid-rowsview .dx-row.dx-selection {
            background: rgba(56, 189, 248, 0.1) !important;
            border-left: 3px solid #38bdf8 !important;
        }



/* Search Box */
.dx-searchbox {
    background: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(56, 189, 248, 0.12) !important;
    border-radius: 10px !important;
    color: #e2e8f0 !important;
}

    .dx-searchbox:focus-within {
        border-color: rgba(56, 189, 248, 0.3) !important;
        box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08) !important;
    }

    .dx-searchbox .dx-texteditor-input {
        color: #e2e8f0 !important;
    }

        .dx-searchbox .dx-texteditor-input::placeholder {
            color: #475569 !important;
        }

/* Pager */
.dx-datagrid-pager {
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
    padding: 16px !important;
    margin-top: 8px !important;
}

    .dx-datagrid-pager .dx-page,
    .dx-datagrid-pager .dx-page-size {
        color: #64748b !important;
        border-radius: 8px !important;
        padding: 8px 14px !important;
        margin: 0 3px !important;
        border: 1px solid transparent !important;
        transition: all 0.2s ease !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
    }

        .dx-datagrid-pager .dx-page:hover,
        .dx-datagrid-pager .dx-page-size:hover {
            background: rgba(56, 189, 248, 0.1) !important;
            color: #38bdf8 !important;
            border-color: rgba(56, 189, 248, 0.2) !important;
        }

        .dx-datagrid-pager .dx-page.dx-selection,
        .dx-datagrid-pager .dx-page-size.dx-selection {
            background: rgba(56, 189, 248, 0.15) !important;
            color: #38bdf8 !important;
            border-color: rgba(56, 189, 248, 0.3) !important;
            font-weight: 600 !important;
        }

/* Scrollbar */
.dx-datagrid-rowsview ::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

.dx-datagrid-rowsview ::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5) !important;
    border-radius: 4px !important;
}

.dx-datagrid-rowsview ::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.2) !important;
    border-radius: 4px !important;
}

    .dx-datagrid-rowsview ::-webkit-scrollbar-thumb:hover {
        background: rgba(56, 189, 248, 0.4) !important;
    }

/* ============================================
           BADGE STOCK
           ============================================ */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.stock-alto {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.stock-bajo {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.stock-agotado {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.stock-alto .stock-dot {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.stock-bajo .stock-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

.stock-agotado .stock-dot {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

/* ============================================
           BOTONES ACCIÓN PREMIUM
           ============================================ */
.acciones-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

    .btn-action::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.4s ease, height 0.4s ease;
    }

    .btn-action:hover::before {
        width: 100%;
        height: 100%;
    }

    .btn-action i {
        position: relative;
        z-index: 1;
    }

.btn-edit {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

    .btn-edit:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
    }

.btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

    .btn-delete:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    }

/* ============================================
           BOTÓN CANCELAR
           ============================================ */
.btn-cancelar {
    background: linear-gradient(135deg, #475569, #334155);
    color: #e2e8f0;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

    .btn-cancelar:hover {
        background: linear-gradient(135deg, #64748b, #475569);
        transform: translateY(-1px);
    }

    .btn-cancelar img {
        width: 20px;
        height: 20px;
        filter: brightness(0) invert(1);
    }

/* ============================================
           POPUP PREMIUM
           ============================================ */
.dx-popup-wrapper .dx-popup-content {
    background: #0f172a !important;
    border: 1px solid rgba(56, 189, 248, 0.1) !important;
}

.dx-popup-wrapper .dx-popup-title {
    background: linear-gradient(180deg, #1e293b, #0f172a) !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15) !important;
    color: #f1f5f9 !important;
    padding: 18px 24px !important;
}

    .dx-popup-wrapper .dx-popup-title h3 {
        color: #38bdf8 !important;
        font-weight: 700 !important;
    }

/* Formulario dentro del popup */
.form-layout-customPopup {
    background: transparent !important;
}

    .form-layout-customPopup .dx-field-item-label-text {
        color: #94a3b8 !important;
        font-weight: 600 !important;
        font-size: 0.85rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }

    .form-layout-customPopup .dx-texteditor-input {
        background: rgba(30, 41, 59, 0.6) !important;
        border: 1px solid rgba(56, 189, 248, 0.15) !important;
        border-radius: 10px !important;
        color: #e2e8f0 !important;
        padding: 12px 16px !important;
        font-size: 0.95rem !important;
        transition: all 0.2s ease !important;
    }

        .form-layout-customPopup .dx-texteditor-input:focus {
            border-color: rgba(56, 189, 248, 0.4) !important;
            box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1) !important;
            outline: none !important;
        }

        .form-layout-customPopup .dx-texteditor-input::placeholder {
            color: #475569 !important;
        }

/* Botones del popup */
.button-containerPopup {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-guardar {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-guardar:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 25px rgba(34, 197, 94, 0.35);
    }

    .btn-guardar:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* ============================================
           EMPTY STATE
           ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

    .empty-state i {
        font-size: 3rem;
        color: #334155;
        margin-bottom: 16px;
    }

    .empty-state h3 {
        color: #94a3b8;
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

/* ============================================
           RESPONSIVE
           ============================================ */
@media (max-width: 768px) {
    .page-productos {
        padding: 16px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

/****************************Formularios ***********************************************/
/*=========================================================================================================*/




/* Forzar estilos en modal DevExpress */
.dxbl-popup-root {
    --dxbl-popup-content-bg: #1e1e2f !important;
    --dxbl-popup-content-color: #e0e0f0 !important;
}

.dxbl-popup-content {
    background-color: #1e1e2f !important;
    color: #e0e0f0 !important;
}

.dxbl-popup-header {
    background-color: #252538 !important;
    border-bottom: 1px solid #3a3a5c !important;
}

.dxbl-popup-close-button {
    color: #a0a0c0 !important;
}

    .dxbl-popup-close-button:hover {
        background: rgba(255,255,255,0.1) !important;
        color: #fff !important;
    }

/* Quitar título duplicado si aparece */
.dxbl-popup-content h3:first-child {
    display: none !important;
}


/*===========================|FORMULARIO CREDITO=========================================================*/

/* ─── Variables ─── */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1e1b4b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* ─── Header Premium ─── */
.premium-header {
    background: linear-gradient(135deg, var(--dark) 0%, #312e81 50%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

    .premium-header::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -20%;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%);
        pointer-events: none;
    }

.premium-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header-title-section {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-icon-wrapper {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.15);
}

    .header-icon-wrapper img {
        width: 32px;
        height: 32px;
        filter: brightness(0) invert(1);
    }

.header-main-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.header-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    margin: 4px 0 0 0;
}

.btn-premium-new {
    padding: 12px 24px !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

    .btn-premium-new .btn-icon-wrapper img {
        width: 24px;
        height: 24px;
    }

/* ─── Stats Cards ─── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--gray-100);
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
    }

.stat-card-total {
    border-left: 4px solid var(--primary);
}

.stat-card-pending {
    border-left: 4px solid var(--warning);
}

.stat-card-paid {
    border-left: 4px solid var(--success);
}

.stat-card-amount {
    border-left: 4px solid var(--info);
}

.stat-icon {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.05;
}

.stat-card-total .stat-decoration {
    background: var(--primary);
}

.stat-card-pending .stat-decoration {
    background: var(--warning);
}

.stat-card-paid .stat-decoration {
    background: var(--success);
}

.stat-card-amount .stat-decoration {
    background: var(--info);
}

/* ─── Premium Card ─── */
.premium-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid var(--gray-100);
    background: linear-gradient(to right, var(--gray-50), white);
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(99,102,241,0.4);
}

.card-header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.badge-info {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-footer-bar {
    padding: 16px 28px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.btn-return {
    padding: 10px 20px !important;
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h4 {
    color: var(--gray-700);
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ─── Grid Custom ─── */
/*.premium-grid ::deep .dxbl-grid {
    border: none !important;
}*/
.premium-grid ::deep .dxbl-grid {
    min-width: 900px; /* fuerza scroll en pantallas pequeñas */
}

.premium-grid ::deep .dxbl-grid-header {
    background: linear-gradient(to bottom, var(--gray-50), white) !important;
    border-bottom: 2px solid var(--gray-200) !important;
}

.premium-grid ::deep .dxbl-grid-header-cell {
    font-weight: 600 !important;
    color: var(--gray-700) !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.premium-grid ::deep .dxbl-grid-data-row {
    transition: background-color 0.2s ease;
}

    .premium-grid ::deep .dxbl-grid-data-row:hover {
        background-color: var(--gray-50) !important;
    }

/* ─── Badges Grid ─── */
.order-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.85rem;
}

.order-hash {
    color: var(--primary);
}

.description-text {
    display: block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray-600);
}

.amount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-size: 0.85rem;
}

.date-icon {
    font-size: 0.9rem;
}

.voucher-thumb-link {
    display: inline-block;
    cursor: pointer;
}

.voucher-thumb {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

    .voucher-thumb:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow-glow);
    }

    .voucher-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.voucher-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voucher-thumb:hover .voucher-overlay {
    opacity: 1;
}

.voucher-overlay span {
    font-size: 1.2rem;
}

.voucher-missing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.estado-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.estado-pagado {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.estado-credito {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.estado-default {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    color: var(--gray-600);
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-size: 0.85rem;
}

.user-avatar {
    font-size: 1rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.action-btn {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
}

    .action-btn img {
        width: 18px;
        height: 18px;
    }

/* ─── Popup Premium ─── */
.premium-popup ::deep .dxbl-popup-content {
    padding: 0 !important;
}

.premium-popup ::deep .dxbl-popup-header {
    background: linear-gradient(135deg, var(--dark), #312e81) !important;
    color: white !important;
    padding: 18px 28px !important;
    border-bottom: none !important;
}

.premium-popup ::deep .dxbl-popup-header-text {
    color: white !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
}

.premium-popup ::deep .dxbl-popup-close-button {
    color: rgba(255,255,255,0.7) !important;
}

    .premium-popup ::deep .dxbl-popup-close-button:hover {
        color: white !important;
        background: rgba(255,255,255,0.1) !important;
    }

/* ─── Form Header ─── */
.form-premium-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
    background: linear-gradient(to right, var(--gray-50), white);
    border-bottom: 1px solid var(--gray-100);
}

.form-header-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .form-header-icon.new-mode {
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    }

    .form-header-icon.edit-mode {
        background: linear-gradient(135deg, var(--warning), #d97706);
    }

    .form-header-icon img {
        width: 26px;
        height: 26px;
        filter: brightness(0) invert(1);
    }

.form-header-info h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-800);
}

.form-header-info p {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.status-pill {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.pill-new {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
}

.pill-edit {
    background: linear-gradient(135deg, #fcd34d, var(--warning));
    color: #78350f;
}

/* ─── Form Sections ─── */
.form-section {
    padding: 24px 28px;
}

    .form-section + .form-section {
        border-top: 1px solid var(--gray-100);
    }

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.section-title {
    font-weight: 700;
    color: var(--gray-800);
    font-size: 0.95rem;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--gray-200), transparent);
}

/* ─── Form Grid ─── */
.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-field-group {
    margin-bottom: 4px;
}

    .form-field-group.full-width {
        grid-column: 1 / -1;
    }

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.field-icon {
    font-size: 1rem;
}

.required-mark {
    color: var(--danger);
    font-weight: 700;
}

/* ─── Premium Inputs ─── */
.premium-input ::deep input,
.premium-input ::deep .dxbl-text-edit-input,
.premium-input ::deep .dxbl-spin-edit-input,
.premium-input ::deep .dxbl-date-edit-input {
    border: 2px solid var(--gray-200) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    background: white !important;
}

    .premium-input ::deep input:focus,
    .premium-input ::deep .dxbl-text-edit-input:focus,
    .premium-input ::deep .dxbl-spin-edit-input:focus,
    .premium-input ::deep .dxbl-date-edit-input:focus {
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
        outline: none !important;
    }

.readonly-input ::deep input {
    background: var(--gray-50) !important;
    color: var(--gray-500) !important;
    cursor: not-allowed;
}

.amount-input ::deep input {
    font-weight: 700 !important;
    color: #065f46 !important;
}

/* ─── Custom Select ─── */
.custom-select-wrapper {
    position: relative;
}

.premium-select {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: white;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .premium-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        outline: none;
    }

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.7rem;
    pointer-events: none;
}

/* ─── Upload Zone ─── */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 8px;
    transition: all 0.3s ease;
}

    .upload-zone:hover {
        border-color: var(--primary);
        background: var(--gray-50);
    }

.upload-empty {
    text-align: center;
    padding: 32px 20px;
    position: relative;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.upload-title {
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 4px 0;
}

.upload-subtitle {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin: 0 0 12px 0;
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
}

.preview-image-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--gray-200);
}

    .preview-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-image-wrapper:hover .preview-overlay {
    opacity: 1;
}

.btn-remove-image {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

    .btn-remove-image:hover {
        background: #dc2626;
        transform: scale(1.05);
    }

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-filename {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 500;
    word-break: break-all;
}

.upload-input-replace {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.replace-hint {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

/* ─── Form Footer ─── */
.form-premium-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.required-note {
    font-size: 0.8rem;
    color: var(--gray-400);
}

.form-footer-actions {
    display: flex;
    gap: 12px;
}

.btn-form-action {
    padding: 10px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

    .btn-form-action .btn-icon-wrapper img {
        width: 20px;
        height: 20px;
    }

.btn-primary-action {
    min-width: 180px;
    justify-content: center !important;
}
.card-footer-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* ← permite que bajen si no caben */
    gap: 10px;
}
/* ─── Voucher Popup ─── */
.voucher-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.voucher-popup-icon {
    font-size: 1.5rem;
}

.voucher-popup-id {
    margin-left: auto;
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.voucher-viewer {
    padding: 24px;
}

.voucher-image-container {
    background: var(--gray-900);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.voucher-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.voucher-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.detail-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--gray-800);
    font-weight: 600;
}

    .detail-value.amount {
        color: var(--success);
        font-size: 1.1rem;
    }

.voucher-empty {
    text-align: center;
    padding: 48px 20px;
}

    .voucher-empty .empty-icon {
        font-size: 3.5rem;
        margin-bottom: 12px;
    }

    .voucher-empty h5 {
        color: var(--gray-600);
        margin-bottom: 8px;
    }

    .voucher-empty p {
        color: var(--gray-400);
        font-size: 0.9rem;
    }

.voucher-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
}

/* ─── Responsive ─── */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .premium-header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .form-grid-2col {
        grid-template-columns: 1fr;
    }

    .form-premium-footer {
        flex-direction: column;
        gap: 16px;
    }

    .form-footer-actions {
        width: 100%;
        justify-content: stretch;
    }

    .btn-form-action {
        flex: 1;
        justify-content: center !important;
    }

    .voucher-details {
        grid-template-columns: 1fr;
    }
}

/*===============Nuevo para los botones footers*=======================/
/*========================================================================*/
/* ─── Footer Bar ─── */
.card-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(to right, var(--gray-50), white);
    border-top: 1px solid var(--gray-100);
    gap: 12px;
}

/* ─── Footer Button ─── */
.btn-footer {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

    .btn-footer:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.2) !important;
    }

.btn-footer-primary {
    background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
    border: none !important;
    color: white !important;
}

    .btn-footer-primary:hover {
        background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
    }

.btn-footer-icon img {
    width: 20px;
    height: 20px;
}

/* ─── Responsive ─── */
@media (max-width: 576px) {
    .card-footer-bar {
        flex-direction: column;
    }

    .btn-footer {
        width: 100%;
        justify-content: center !important;
    }
}

/*****table responsive*/
.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

    .table-responsive-wrapper::-webkit-scrollbar {
        height: 6px;
    }

    .table-responsive-wrapper::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    .table-responsive-wrapper::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }


/* =========================================================
   FORZADO DE COLOR BLANCO BRILLANTE PARA DXGRID DE BLAZOR
   ========================================================= */

/* Atacamos directamente todas las celdas de datos de la grilla de Blazor */
.dxbl-grid td,
.dxbl-grid-table td,
[class*="dxbl-grid-cell"],
[class*="dxbl-grid-data-row"] td {
    color: #ffffff !important; /* 🌟 Blanco brillante garantizado */
    opacity: 1 !important; /* Elimina cualquier transparencia predeterminada */
    font-weight: 500 !important; /* Le da un poco más de cuerpo a la letra para leer mejor */
}

    /* Forzamos a que si DevExpress mete un texto anidado (span, a, div), también sea blanco */
    .dxbl-grid td *,
    [class*="dxbl-grid-cell"] *,
    [class*="dxbl-grid-data-row"] td * {
        color: #ffffff !important;
        opacity: 1 !important;
    }

    /* 🔹 EXCEPCIÓN COMPLEMENTARIA: Mantenemos tu color verde/cian brillante SOLO para la columna de MONTO */
    .dxbl-grid td[data-field="Monto"],
    .dxbl-grid td:nth-child(4),
    .dxbl-grid td:nth-child(4) * {
        color: #52e6cf !important; /* Mantiene el color verde para el dinero C$35,500.00 */
    }


/* =========================================================
   DISEÑO DE BADGES PREMIUM PARA EL PANEL DEL TALLER
   ========================================================= */

/* Estilo para el Número de Orden */
.badge-orden-premium {
    background-color: rgba(15, 23, 42, 0.6) !important;
    color: #38bdf8 !important; /* Texto cian brillante */
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    padding: 4px 10px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    display: inline-block !important;
    letter-spacing: 0.5px !important;
}

/* Base común para todos los Estados (Bordes suaves y translúcidos) */
.badge-status-base {
    padding: 5px 12px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    border-radius: 20px !important; /* Estilo píldora elegante */
    display: inline-block !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

/* 🔴 ESTADO: CREDITO (Rojo elegante con fondo suave) */
.badge-status-red {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important; /* Rojo fuego */
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

/* 🔵 ESTADO: PAGADO (Azul primary de la marca) */
.badge-status-primary {
    background-color: rgba(13, 110, 253, 0.15) !important;
    color: #38bdf8 !important; /* Azul cian nítido */
    border: 1px solid rgba(13, 110, 253, 0.4) !important;
}

/* 🟡 ESTADO: PENDIENTE */
.badge-status-warning {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

/* 🟢 ESTADO: PROCESO / APROBADO */
.badge-status-info {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
}


/*=================Popup credito=========================================*/
.voucher-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.voucher-container:hover .voucher-overlay {
    opacity: 1;
    pointer-events: auto;
}


