/* ===== ESTILOS FRONTEND CONFITECA PLANILLAS ===== */

/* Container principal */
.cpd-frontend-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.cpd-frontend-wrapper h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
}

/* ===== NUEVA SECCIÓN: BARRA DE INFORMACIÓN DE USUARIO ===== */
.cpd-user-info-bar {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cpd-user-logged-in,
.cpd-user-not-logged-in {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.cpd-user-logged-in {
    justify-content: space-between;
}

.cpd-user-not-logged-in {
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.cpd-welcome-message {
    font-weight: 500;
    color: #2c3e50;
}

.cpd-login-message {
    margin: 0 0 15px;
    color: #7f8c8d;
    font-style: italic;
}

/* Botón pequeño para logout */
.cpd-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

/* ===== NUEVA SECCIÓN: FORMULARIO DE LOGIN ===== */
.cpd-login-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cpd-login-form-wrapper {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: loginModalSlideIn 0.3s ease-out;
}

@keyframes loginModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cpd-login-form-wrapper h3 {
    margin: 0 0 25px;
    text-align: center;
    color: #2c3e50;
    font-size: 1.5rem;
}

.cpd-login-form .cpd-form-group {
    margin-bottom: 20px;
}

.cpd-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.cpd-login-form input[type="text"],
.cpd-login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.cpd-login-form input[type="text"]:focus,
.cpd-login-form input[type="password"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cpd-remember-me {
    margin-bottom: 15px;
}

.cpd-remember-me label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.cpd-remember-me input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.cpd-login-messages {
    margin-bottom: 15px;
}

.cpd-login-messages p {
    margin: 0;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.cpd-login-messages .cpd-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.cpd-login-messages .cpd-success {
    background: #efe;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.cpd-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.cpd-form-actions .cpd-btn {
    flex: 1;
}

/* ===== MENSAJES GENERALES ===== */
.cpd-mensaje {
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 8px;
    border-left: 4px solid;
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cpd-mensaje p {
    margin: 0;
    font-size: 14px;
}

.cpd-mensaje-info {
    background: #e3f2fd;
    border-left-color: #2196f3;
    color: #1565c0;
}

.cpd-mensaje-success {
    background: #e8f5e9;
    border-left-color: #4caf50;
    color: #2e7d32;
}

.cpd-mensaje-warning {
    background: #fff3e0;
    border-left-color: #ff9800;
    color: #e65100;
}

.cpd-mensaje-error {
    background: #ffebee;
    border-left-color: #f44336;
    color: #c62828;
}

/* ===== FILTROS ===== */
.cpd-frontend-filters {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cpd-frontend-filters h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.cpd-filter-form .cpd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.cpd-filter-group {
    flex: 1;
    min-width: 150px;
}

.cpd-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.cpd-filter-group input,
.cpd-filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.cpd-filter-group input:focus,
.cpd-filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cpd-filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== BOTONES ===== */
.cpd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.cpd-btn-primary {
    background-color: #3498db;
    color: white;
}

.cpd-btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.cpd-btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.cpd-btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-1px);
}

.cpd-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== ÁREA DE RESULTADOS ===== */
.cpd-resultados-container {
    min-height: 400px;
}

.cpd-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-style: italic;
}

.cpd-loading p {
    margin: 0;
    font-size: 1.1rem;
}

.cpd-error-message,
.cpd-no-results {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.cpd-error-message {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}

.cpd-no-results {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    color: #4a5568;
}

/* ===== GRID DE PLANILLAS ===== */
.cpd-planillas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.cpd-planilla-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cpd-planilla-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cpd-card-header {
    padding: 20px 20px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.cpd-card-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.cpd-estado-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpd-estado-actualizado {
    background: rgba(255,255,255,0.25);
    color: white;
}

.cpd-estado-borrador {
    background: rgba(255,193,7,0.9);
    color: #333;
}

.cpd-card-body {
    padding: 20px;
}

.cpd-card-info p {
    margin: 0 0 8px;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.cpd-card-info strong {
    color: #333;
    font-weight: 600;
}

.cpd-card-actions {
    padding: 15px 20px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cpd-card-actions .cpd-btn {
    flex: 1;
    min-width: 80px;
    font-size: 13px;
    padding: 8px 12px;
}

/* ===== INFORMACIÓN DE HORARIOS ===== */
.cpd-horarios-preview {
    margin-top: 15px;
    padding: 10px;
    background: #f0f8ff;
    border-radius: 6px;
    border: 1px solid #d1e7f5;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #2c5aa0;
    cursor: help;
    transition: all 0.3s ease;
}

.cpd-horarios-preview:hover {
    background: #e1f0ff;
    border-color: #b8d7ed;
}

.cpd-horarios-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
}

.cpd-horarios-icon.disponible {
    background: #4caf50;
}

.cpd-horarios-icon.no-disponible {
    background: #f44336;
}

.cpd-horarios-badge {
    margin-left: auto;
    font-weight: bold;
    font-size: 16px;
}

.cpd-horarios-badge.no-horarios {
    color: #f44336;
}

/* ===== NUEVA SECCIÓN: ESTILOS PARA NUEVOS CAMPOS ===== */

/* Enlaces de email */
.cpd-email-link {
    color: #2196f3;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 3px;
    padding: 1px 3px;
}

.cpd-email-link:hover {
    color: #1976d2;
    text-decoration: underline;
    background: rgba(33, 150, 243, 0.1);
    padding: 2px 6px;
}

.cpd-email-link:active {
    transform: scale(0.98);
    background: rgba(33, 150, 243, 0.2);
}

/* Campos vacíos */
.cpd-no-email,
.cpd-no-date,
.cpd-no-pedido {
    color: #999;
    font-style: italic;
    font-size: 0.85em;
    background: rgba(255, 193, 7, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Números de pedido */
.cpd-numero-pedido {
    background: linear-gradient(45deg, #e3f2fd, #f3e5f5);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9em;
    font-weight: 600;
    border: 1px solid #e1bee7;
    color: #6a1b9a;
    display: inline-block;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(255,255,255,0.8);
}

/* Columnas de nuevos campos */
.cpd-email-column,
.cpd-fecha-pedido-column,
.cpd-numero-pedido-column {
    transition: background-color 0.2s ease;
    position: relative;
}

.cpd-email-column:hover:not(.cpd-email-empty),
.cpd-fecha-pedido-column:hover:not(.cpd-fecha-empty),
.cpd-numero-pedido-column:hover:not(.cpd-pedido-empty) {
    background: rgba(33, 150, 243, 0.05);
}

.cpd-email-empty,
.cpd-fecha-empty,
.cpd-pedido-empty {
    background: rgba(255, 193, 7, 0.05);
}

/* Indicadores de estado para nuevos campos */
.cpd-email-column:not(.cpd-email-empty)::before {
    content: "✉️";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.7;
}

.cpd-fecha-pedido-column:not(.cpd-fecha-empty)::before {
    content: "📅";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.7;
}

.cpd-numero-pedido-column:not(.cpd-pedido-empty)::before {
    content: "📋";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.7;
}

/* Ajustar padding cuando hay iconos */
.cpd-email-column:not(.cpd-email-empty),
.cpd-fecha-pedido-column:not(.cpd-fecha-empty),
.cpd-numero-pedido-column:not(.cpd-pedido-empty) {
    padding-left: 20px;
}

/* Resumen de nuevos campos */
.cpd-resumen-nuevos-campos {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 8px;
    border-left: 4px solid #2196f3;
    animation: fadeInUp 0.5s ease-out;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.cpd-resumen-nuevos-campos h5 {
    margin: 0 0 15px;
    color: #1976d2;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpd-resumen-nuevos-campos .cpd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.cpd-resumen-nuevos-campos .cpd-stat-item {
    text-align: center;
    background: white;
    padding: 12px 8px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.cpd-resumen-nuevos-campos .cpd-stat-item:hover {
    transform: translateY(-2px);
}

.cpd-resumen-nuevos-campos .cpd-stat-value {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 4px;
}

.cpd-resumen-nuevos-campos .cpd-stat-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 2px;
}

.cpd-resumen-nuevos-campos .cpd-stat-percent {
    font-size: 0.75em;
    color: #999;
}

/* Colores específicos para cada estadística */
.cpd-resumen-nuevos-campos .cpd-stat-email .cpd-stat-value {
    color: #2196f3;
}

.cpd-resumen-nuevos-campos .cpd-stat-no-email .cpd-stat-value {
    color: #ff9800;
}

.cpd-resumen-nuevos-campos .cpd-stat-fecha .cpd-stat-value {
    color: #9c27b0;
}

.cpd-resumen-nuevos-campos .cpd-stat-pedidos .cpd-stat-value {
    color: #4caf50;
}

/* Mensaje de sugerencia */
.cpd-resumen-nuevos-campos .cpd-suggestion {
    margin: 15px 0 0;
    color: #e65100;
    font-size: 0.9em;
    font-style: italic;
    text-align: center;
    background: rgba(255, 152, 0, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* ===== PAGINACIÓN ===== */
.cpd-paginacion {
    margin-top: 30px;
}

.cpd-paginacion-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.cpd-paginacion-info {
    color: #666;
    font-size: 14px;
}

.cpd-paginacion-botones {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.cpd-btn-paginacion {
    min-width: 40px;
    padding: 8px 12px;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cpd-btn-paginacion:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.cpd-btn-paginacion.cpd-btn-active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* ===== MODAL ===== */
.cpd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.cpd-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cpd-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.cpd-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.cpd-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.cpd-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.cpd-modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.cpd-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* ===== DETALLE DE PLANILLA ===== */
.cpd-detalle-planilla {
    color: #333;
}

.cpd-detalle-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.cpd-detalle-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.cpd-detalle-info p {
    margin: 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.cpd-detalle-items h4 {
    margin: 0 0 20px;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Tabla responsive */
.cpd-table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.cpd-detalle-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cpd-detalle-table th,
.cpd-detalle-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
}

.cpd-detalle-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    position: relative;
}

.cpd-detalle-table tbody tr:hover {
    background: #f8f9fa;
}

.cpd-detalle-table .cpd-text-right {
    text-align: right;
}

.cpd-detalle-table .cpd-text-center {
    text-align: center;
}

.cpd-novedades-row td {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    font-style: italic;
}

.cpd-totales-row {
    background: #e8f4f8;
    font-weight: 600;
}

.cpd-totales-row td {
    border-top: 2px solid #3498db;
    font-size: 14px;
}

.cpd-detalle-novedades {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.cpd-detalle-novedades h4 {
    margin: 0 0 10px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.cpd-detalle-novedades p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Columna de horarios en el detalle */
.cpd-horarios-column {
    max-width: 150px;
    font-size: 12px;
    line-height: 1.4;
}

.cpd-horarios-column:not(.cpd-horarios-empty) {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cpd-horarios-column:not(.cpd-horarios-empty):hover {
    background: rgba(40, 167, 69, 0.1);
}

.cpd-horarios-empty {
    color: #999;
    font-style: italic;
}

.cpd-horarios-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

/* ===== NUEVOS ESTILOS PARA COLUMNAS DE NUEVOS CAMPOS EN DETALLE ===== */

/* Encabezados específicos para nuevos campos */
.cpd-detalle-table th.cpd-email-header {
    background: linear-gradient(45deg, #e3f2fd, #f3e5f5);
    color: #1976d2;
}

.cpd-detalle-table th.cpd-fecha-pedido-header {
    background: linear-gradient(45deg, #f3e5f5, #fce4ec);
    color: #7b1fa2;
}

.cpd-detalle-table th.cpd-numero-pedido-header {
    background: linear-gradient(45deg, #e8f5e9, #f1f8e9);
    color: #388e3c;
}

/* Tamaños específicos para nuevos campos */
.cpd-email-column {
    max-width: 180px;
    word-break: break-word;
}

.cpd-fecha-pedido-column {
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

.cpd-numero-pedido-column {
    min-width: 140px;
    max-width: 160px;
    text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .cpd-frontend-wrapper {
        padding: 15px;
    }
    
    .cpd-frontend-wrapper h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .cpd-user-info-bar {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .cpd-user-logged-in {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .cpd-frontend-filters {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .cpd-filter-form .cpd-filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .cpd-filter-group {
        min-width: auto;
    }
    
    .cpd-filter-actions {
        justify-content: stretch;
    }
    
    .cpd-filter-actions .cpd-btn {
        flex: 1;
    }
    
    .cpd-planillas-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cpd-card-actions {
        flex-direction: column;
    }
    
    .cpd-card-actions .cpd-btn {
        flex: none;
    }
    
    .cpd-modal {
        padding: 10px;
    }
    
    .cpd-modal-content {
        max-height: 95vh;
    }
    
    .cpd-modal-header {
        padding: 20px;
    }
    
    .cpd-modal-body {
        padding: 20px;
    }
    
    .cpd-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .cpd-detalle-info {
        grid-template-columns: 1fr;
    }
    
    .cpd-detalle-table {
        font-size: 12px;
    }
    
    .cpd-detalle-table th,
    .cpd-detalle-table td {
        padding: 8px 6px;
    }
    
    .cpd-paginacion-botones {
        gap: 3px;
    }
    
    .cpd-btn-paginacion {
        min-width: 35px;
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .cpd-login-form-wrapper {
        margin: 20px;
        padding: 20px;
    }
    
    /* Responsive para nuevos campos */
    .cpd-numero-pedido {
        display: block;
        text-align: center;
        margin: 2px 0;
        word-break: break-all;
    }
    
    .cpd-email-link {
        word-break: break-all;
    }
    
    .cpd-resumen-nuevos-campos .cpd-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .cpd-resumen-nuevos-campos .cpd-stat-item {
        padding: 8px 6px;
    }
    
    /* Ajustar iconos en móviles */
    .cpd-email-column:not(.cpd-email-empty)::before,
    .cpd-fecha-pedido-column:not(.cpd-fecha-empty)::before,
    .cpd-numero-pedido-column:not(.cpd-pedido-empty)::before {
        display: none;
    }
    
    .cpd-email-column:not(.cpd-email-empty),
    .cpd-fecha-pedido-column:not(.cpd-fecha-empty),
    .cpd-numero-pedido-column:not(.cpd-pedido-empty) {
        padding-left: 8px;
    }
}

@media (max-width: 480px) {
    .cpd-frontend-wrapper {
        padding: 10px;
    }
    
    .cpd-frontend-filters {
        padding: 15px;
    }
    
    .cpd-card-header {
        padding: 15px;
    }
    
    .cpd-card-body {
        padding: 15px;
    }
    
    .cpd-card-actions {
        padding: 10px 15px 15px;
    }
    
    /* Hacer tabla completamente responsive en móviles */
    .cpd-detalle-table,
    .cpd-detalle-table thead,
    .cpd-detalle-table tbody,
    .cpd-detalle-table th,
    .cpd-detalle-table td,
    .cpd-detalle-table tr {
        display: block;
    }
    
    .cpd-detalle-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .cpd-detalle-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 6px;
        background: white;
    }
    
    .cpd-detalle-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    .cpd-detalle-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #333;
    }
    
    /* Mejorar estadísticas en móviles pequeños */
    .cpd-resumen-nuevos-campos .cpd-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cpd-resumen-nuevos-campos .cpd-stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 10px 12px;
    }
    
    .cpd-resumen-nuevos-campos .cpd-stat-value {
        font-size: 1.2em;
    }
}

/* ===== ANIMACIONES ===== */
.cpd-planilla-card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación específica para nuevos campos */
.cpd-resumen-nuevos-campos {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animación para elementos interactivos */
.cpd-email-link,
.cpd-numero-pedido {
    transition: all 0.2s ease;
}

.cpd-email-link:hover,
.cpd-numero-pedido:hover {
    transform: scale(1.02);
}

/* ===== UTILIDADES ===== */
.cpd-text-center { text-align: center; }
.cpd-text-right { text-align: right; }
.cpd-text-left { text-align: left; }

.cpd-hidden { display: none; }
.cpd-visible { display: block; }

/* ===== ACCESIBILIDAD ===== */
.cpd-btn:focus,
.cpd-filter-group input:focus,
.cpd-filter-group select:focus,
.cpd-email-link:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Mejorar contraste para elementos interactivos */
.cpd-email-link:focus,
.cpd-numero-pedido:focus {
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.3);
}

/* ===== PRINT STYLES ===== */
@media print {
    .cpd-frontend-filters,
    .cpd-card-actions,
    .cpd-paginacion,
    .cpd-modal-footer,
    .cpd-user-info-bar,
    .cpd-login-form-container {
        display: none;
    }
    
    .cpd-planilla-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #333;
    }
    
    .cpd-email-link {
        color: #000;
        text-decoration: underline;
    }
    
    .cpd-numero-pedido {
        background: #f0f0f0;
        border: 1px solid #999;
    }
    
    .cpd-resumen-nuevos-campos {
        background: #f9f9f9;
        border: 1px solid #999;
    }
}