* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.last-update {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Tabs Navigation */
.tabs-container {
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 5px;
    backdrop-filter: blur(10px);
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.tab-button {
    background: transparent;
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
}

.tab-button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.tab-button.active {
    background: white;
    color: #667eea;
    opacity: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Dashboard Grid */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-header i {
    font-size: 2rem;
    margin-right: 15px;
    padding: 12px;
    border-radius: 12px;
    color: white;
}

.card-header h3 {
    font-size: 1.4rem;
    color: #333;
    flex-grow: 1;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

/* Card Type Specific Colors */
.status-card .card-header i {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.actions-card .card-header i {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.filters-card .card-header i {
    background: linear-gradient(45deg, #FF9800, #F57C00);
}

.reports-card .card-header i {
    background: linear-gradient(45deg, #9C27B0, #7B1FA2);
}

.clientes-card .card-header i {
    background: linear-gradient(45deg, #607D8B, #455A64);
}

.facturacion-filters-card .card-header i {
    background: linear-gradient(45deg, #795548, #5D4037);
}

.facturacion-resumen-card .card-header i {
    background: linear-gradient(45deg, #009688, #00695C);
}

.generate-individual-card .card-header i {
    background: linear-gradient(45deg, #8BC34A, #689F38);
}

.generate-all-card .card-header i {
    background: linear-gradient(45deg, #CDDC39, #AFB42B);
}

/* System Status */
.system-status {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.status-label {
    font-weight: 600;
    color: #555;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.status-indicator.online {
    color: #4CAF50;
}

.status-indicator.offline {
    color: #f44336;
}

.status-indicator.warning {
    color: #FF9800;
}

/* Button Styles */
.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #5a6268);
}

.btn-info {
    background: linear-gradient(45deg, #17a2b8, #138496);
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #c82333);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #218838);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    width: auto;
    margin: 0;
}

/* Filters Section */
.filters-section {
    margin-bottom: 30px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 5px;
}

.btn-toggle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    color: #495057;
}

.btn-toggle:hover {
    background: #e9ecef;
}

.btn-toggle.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Reports Grid */
.reports-section {
    margin-bottom: 30px;
}

/* Reports Grid - Continuación */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    min-height: 200px;
}

.report-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.report-item:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.report-item.completed {
    border-left: 6px solid #4CAF50;
}

.report-item.pending {
    border-left: 6px solid #FF9800;
}

.report-item.error {
    border-left: 6px solid #f44336;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.report-period {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.report-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.report-status.completed {
    background: #d4edda;
    color: #155724;
}

.report-status.pending {
    background: #fff3cd;
    color: #856404;
}

.report-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* NUEVOS ESTILOS PARA INFORMACIÓN DE CLIENTE */
.report-client-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    border-left: 4px solid #007bff;
}

.client-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #2c3e50;
}

.client-name i {
    color: #007bff;
}

.client-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #6c757d;
}

.client-nit {
    font-weight: 600;
}

.client-razon {
    font-style: italic;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.summary-item {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.summary-label {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.report-date {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

/* Reports Table */
.reports-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.reports-table th,
.reports-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.reports-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.reports-table tr:hover {
    background: #f8f9fa;
}

.client-info-table strong {
    display: block;
    color: #2c3e50;
    font-size: 14px;
}

.client-info-table small {
    color: #6c757d;
    font-size: 11px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.number-cell,
.percentage-cell,
.currency-cell {
    text-align: right;
    font-weight: 600;
}

.actions-cell {
    text-align: center;
}

.empty-state-table {
    padding: 40px;
    text-align: center;
    color: #6c757d;
}

.empty-state-table i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Clientes Grid */
.clientes-section {
    margin-bottom: 30px;
}

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    min-height: 200px;
}

.cliente-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #28a745;
}

.cliente-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cliente-item.inactive {
    border-left-color: #dc3545;
    opacity: 0.7;
}

.cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.cliente-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.cliente-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cliente-status.active {
    background: #d4edda;
    color: #155724;
}

.cliente-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.cliente-info p {
    margin: 8px 0;
    color: #495057;
    font-size: 14px;
}

.cliente-info strong {
    color: #2c3e50;
}

.cliente-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

/* Facturación por Cliente */
.facturacion-section {
    margin-bottom: 30px;
}

.facturacion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.facturacion-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #007bff;
    margin-bottom: 20px;
}

.facturacion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.facturacion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.cliente-info h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 18px;
}

.cliente-info p {
    margin: 0 0 3px 0;
    color: #6c757d;
    font-size: 14px;
}

.cliente-info small {
    color: #adb5bd;
    font-size: 12px;
}

.facturacion-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.facturacion-status.active {
    background: #d4edda;
    color: #155724;
}

.facturacion-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.facturacion-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.facturacion-summary .summary-item {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.facturacion-summary .summary-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
}

.facturacion-summary .summary-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
}

.facturacion-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #667eea;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6c757d;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    max-width: 400px;
    line-height: 1.5;
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #dc3545;
    text-align: center;
}

.error-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.error-state h3 {
    margin-bottom: 10px;
    color: #721c24;
}

.error-state p {
    max-width: 400px;
    line-height: 1.5;
    margin-bottom: 20px;
    color: #6c757d;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.large-modal .modal-content {
    max-width: 90vw;
    width: 1200px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modal-footer .btn {
    width: auto;
    margin: 0;
}

/* Report Detail Styles */
.report-detail-container {
    max-width: 100%;
}

.report-section {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.report-section h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 5px solid #2196f3;
    margin-bottom: 25px;
}

.client-section h4 {
    color: #1976d2;
}

.client-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.client-detail-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #2196f3;
}

.client-detail-item strong {
    display: block;
    margin-bottom: 5px;
    color: #1976d2;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.client-detail-item span {
    color: #2c3e50;
    font-size: 14px;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.metric-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.metric-label {
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
}

.document-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.document-detail-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #28a745;
}

.document-detail-card h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.detail-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.detail-metrics div {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    border: 1px solid #e9ecef;
}

.report-detail {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    white-space: pre-line;
    line-height: 1.6;
    font-size: 0.95rem;
    border: 1px solid #e9ecef;
    max-height: 400px;
    overflow-y: auto;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 10px;
    overflow: hidden;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}

.toast-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-body {
    padding: 15px 20px;
    color: #495057;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toast-close:hover {
    background: #f8f9fa;
    color: #333;
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.success .toast-title {
    color: #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.error .toast-title {
    color: #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

.toast.warning .toast-title {
    color: #856404;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

.toast.info .toast-title {
    color: #17a2b8;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.d-flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.gap-15 {
    gap: 15px;
}

.gap-20 {
    gap: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.p-10 {
    padding: 10px;
}

.p-15 {
    padding: 15px;
}

.p-20 {
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .dashboard {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .large-modal .modal-content {
        width: 95vw;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
        justify-content: center;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .clientes-grid {
        grid-template-columns: 1fr;
    }
    
    .facturacion-grid {
        grid-template-columns: 1fr;
    }
    
    .report-summary {
        grid-template-columns: 1fr;
    }
    
    .client-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .facturacion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .facturacion-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .facturacion-actions {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .card {
        padding: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .reports-table {
        font-size: 12px;
    }
    
    .reports-table th,
    .reports-table td {
        padding: 8px 6px;
    }
    
    .view-toggle {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
    
    .btn-toggle {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .report-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .document-details-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .card-header i {
        margin: 0;
    }
    
    .status-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .report-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .cliente-header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .cliente-actions,
    .facturacion-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-sm {
        width: 100%;
    }
    
    .report-summary {
        grid-template-columns: 1fr;
    }
    
    .facturacion-summary {
        grid-template-columns: 1fr;
    }
    
    .report-metrics {
        grid-template-columns: 1fr;
    }
    
    .toast {
        margin: 0 10px 10px 10px;
        max-width: calc(100vw - 40px);
    }
    
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .tabs-container,
    .card-actions,
    .btn,
    .modal,
    .toast-container {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .report-detail {
        background: white;
        border: 1px solid #ddd;
    }
}

/* Estilos para búsqueda de clientes */
.search-section {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.search-input-group {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group i.fa-search {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.search-input-group input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input-group input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.btn-icon-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-icon-clear:hover {
    background: #f0f0f0;
    color: #333;
}

.search-results-info {
    margin-top: 10px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.search-highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}