/* Reset and Base Styles */
* {
    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: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-section h1 {
    color: #667eea;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.logo-section p {
    color: #666;
    font-size: 1.1rem;
}

.company-info {
    text-align: right;
}

.company-info h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.company-info h3 {
    color: #667eea;
    font-size: 2rem;
    font-weight: bold;
}

/* Connection Status */
.connection-status {
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.connection-status.online {
    background: #d4edda;
    color: #155724;
}

.connection-status.offline {
    background: #f8d7da;
    color: #721c24;
}

.connection-status.syncing {
    background: #fff3cd;
    color: #856404;
}

/* Sync Info */
.sync-info {
    margin-top: 5px;
}

.sync-info small {
    color: #666;
    font-size: 0.8rem;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: white;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    gap: 10px;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: #f8f9ff;
    color: #667eea;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Tab Content */
.tab-content {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

/* Form Sections */
.form-section h3 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-section, .service-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9ff;
    border-radius: 12px;
    border-left: 5px solid #667eea;
}

.client-section h4, .service-section h4 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
}

/* Service Input Group */
.service-input-group {
    width: 100%;
}

.service-input-group select,
.service-input-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.service-input-group input[type="text"] {
    border-color: #667eea;
    background: #f8f9ff;
}

.service-input-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Payment Section */
.payment-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f0f8ff;
    border-radius: 12px;
    border-left: 5px solid #17a2b8;
}

.payment-section h4 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Textarea Styles */
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    resize: vertical;
    font-family: inherit;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Readonly Input Styles */
.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Editable debt amount styles */
#monto-debe-boleta:not([readonly]),
#monto-debe-factura:not([readonly]) {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
    color: #856404 !important;
    cursor: text !important;
}

#monto-debe-boleta:not([readonly]):focus,
#monto-debe-factura:not([readonly]):focus {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.25) !important;
}

/* Payment Status Indicators */
.payment-status-complete {
    color: #28a745;
    font-weight: bold;
}

.payment-status-partial {
    color: #ffc107;
    font-weight: bold;
}

.payment-status-pending {
    color: #dc3545;
    font-weight: bold;
}

/* Buttons */
.btn-search, .btn-add, .btn-primary, .btn-secondary {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-search {
    background: #17a2b8;
    color: white;
    white-space: nowrap;
}

.btn-search:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.3);
}

.btn-add {
    background: #28a745;
    color: white;
    margin-top: 15px;
}

.btn-add:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* Services List */
.services-list {
    margin: 20px 0;
}

.service-added {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.service-added:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-info {
    flex: 1;
}

.service-info h5 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.service-info p {
    color: #666;
    margin: 0;
}

.service-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* Totals Section */
.totals-section {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    border: 2px solid #e1e5e9;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 1.1rem;
}

.total-row:not(:last-child) {
    border-bottom: 1px solid #e1e5e9;
}

.total-final {
    font-size: 1.4rem;
    font-weight: bold;
    color: #667eea;
    border-top: 3px solid #667eea !important;
    padding-top: 15px;
    margin-top: 10px;
}

/* Actions */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Historial Styles */
.historial-filters {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 5px solid #667eea;
}

/* Sync Stats */
.sync-stats {
    background: #e8f5e8;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.sync-stats-display {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
}

/* Configuration Sections */
.config-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9ff;
    border-radius: 12px;
    border-left: 5px solid #667eea;
}

.config-section h4 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.historial-list {
    max-height: 500px;
    overflow-y: auto;
}

.historial-item {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.historial-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.historial-info h5 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.historial-info p {
    color: #666;
    margin: 2px 0;
    font-size: 0.9rem;
}

.historial-actions {
    display: flex;
    gap: 10px;
}

.btn-view {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #138496;
    transform: scale(1.05);
}

.btn-sync {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.btn-sync:hover {
    background: #218838;
    transform: scale(1.05);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    background: #f8f9ff;
    padding: 20px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid #e1e5e9;
}

/* PDF Preview Styles */
.pdf-preview {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.pdf-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #667eea;
}

.pdf-header h1 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 10px;
}

.pdf-header p {
    color: #666;
    font-size: 1.1rem;
}

.pdf-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.pdf-section h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.pdf-section p {
    margin: 5px 0;
    color: #555;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.pdf-table th,
.pdf-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.pdf-table th {
    background: #667eea;
    color: white;
    font-weight: bold;
}

.pdf-table tr:nth-child(even) {
    background: #f9f9f9;
}

.pdf-totals {
    margin-top: 30px;
    text-align: right;
}

.pdf-totals .total-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.pdf-totals .total-final {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
    border-top: 2px solid #667eea;
    padding-top: 15px;
    margin-top: 10px;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sync Notification */
.sync-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* PDF Optimized Styles */
.pdf-preview {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    font-family: Arial, sans-serif;
    line-height: 1.4;
    max-width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    box-sizing: border-box;
    font-size: 12px;
}

.pdf-preview .pdf-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

.pdf-preview .pdf-header h1 {
    color: #667eea;
    font-size: 18px;
    margin-bottom: 5px;
}

.pdf-preview .pdf-header h2 {
    color: #667eea;
    font-size: 16px;
    margin-bottom: 5px;
}

.pdf-preview .pdf-header p {
    color: #666;
    font-size: 11px;
    margin: 2px 0;
}

.pdf-preview .pdf-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.pdf-preview .pdf-section h3 {
    color: #333;
    font-size: 13px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}

.pdf-preview .pdf-section p {
    margin: 3px 0;
    color: #555;
    font-size: 11px;
}

.pdf-preview .pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 11px;
}

.pdf-preview .pdf-table th,
.pdf-preview .pdf-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
}

.pdf-preview .pdf-table th {
    background: #667eea;
    color: white;
    font-weight: bold;
    font-size: 11px;
}

.pdf-preview .pdf-totals {
    margin-top: 15px;
    text-align: right;
}

.pdf-preview .pdf-totals .total-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.pdf-preview .pdf-totals .total-final {
    font-size: 14px;
    font-weight: bold;
    color: #667eea;
    border-top: 2px solid #667eea;
    padding-top: 8px;
    margin-top: 8px;
}

/* Responsive Design - Mobile First */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .logo-section h1 {
        font-size: 1.8rem;
    }
    
    .company-info {
        text-align: center;
    }
    
    .company-info h2 {
        font-size: 1.2rem;
    }
    
    .company-info h3 {
        font-size: 1.4rem;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .form-section h3 {
        font-size: 1.4rem;
    }
    
    .client-section, .service-section, .payment-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .client-section h4, .service-section h4, .payment-section h4 {
        font-size: 1.1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        min-width: auto;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-search {
        width: 100%;
        justify-content: center;
    }
    
    .actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .service-added {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }
    
    .historial-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }
    
    .modal-content {
        width: 98%;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .pdf-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .totals-section {
        padding: 15px;
    }
    
    .total-row {
        font-size: 1rem;
    }
    
    .total-final {
        font-size: 1.2rem;
    }
}

/* Tablet Design */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 25px;
    }
    
    .company-info {
        text-align: center;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .form-row {
        flex-wrap: wrap;
    }
    
    .form-group {
        min-width: 200px;
        flex: 1;
    }
    
    .actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .modal-content {
        width: 90%;
        margin: 5% auto;
    }
    
    .pdf-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* iPad and larger tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 20px;
        max-width: 95%;
    }
    
    .header {
        padding: 25px;
    }
    
    .form-group {
        min-width: 220px;
    }
    
    .modal-content {
        width: 85%;
        max-width: 900px;
    }
}

/* Desktop and Laptop */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
    
    .form-group {
        min-width: 250px;
    }
    
    .modal-content {
        width: 80%;
        max-width: 1000px;
    }
}

/* Extra large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .header {
        padding: 40px;
    }
    
    .tab-content {
        padding: 40px;
    }
}

/* Print Styles - Optimized for single page */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    body {
        background: white;
        margin: 0;
        padding: 0;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .header, .nav-tabs, .actions, .modal-footer {
        display: none !important;
    }
    
    .tab-content {
        display: block !important;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
    }
    
    .pdf-preview {
        border: none;
        padding: 15mm;
        margin: 0;
        box-shadow: none;
        page-break-inside: avoid;
        max-width: 210mm;
        min-height: 297mm;
        font-size: 11px;
        line-height: 1.3;
    }
    
    .pdf-preview .pdf-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .pdf-preview .pdf-header h1 {
        font-size: 16px;
        margin-bottom: 3px;
    }
    
    .pdf-preview .pdf-header h2 {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .pdf-preview .pdf-info {
        margin-bottom: 12px;
        gap: 10px;
    }
    
    .pdf-preview .pdf-table {
        margin: 10px 0;
        font-size: 10px;
    }
    
    .pdf-preview .pdf-table th,
    .pdf-preview .pdf-table td {
        padding: 4px;
    }
    
    .pdf-preview .pdf-totals {
        margin-top: 10px;
    }
    
    .modal {
        display: none !important;
    }
    
    @page {
        size: A4;
        margin: 10mm;
    }
}

/* Touch-friendly styles for mobile devices */
@media (hover: none) and (pointer: coarse) {
    .btn-search, .btn-add, .btn-primary, .btn-secondary, .btn-whatsapp, .btn-view, .btn-remove {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .tab-btn {
        min-height: 48px;
        padding: 15px 20px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .pdf-preview {
        font-size: 13px;
    }
    
    .pdf-preview .pdf-table {
        font-size: 11px;
    }
}
