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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Layout */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.logo-section {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 36px;
    color: white;
}

.logo-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.nav-menu ul {
    list-style: none;
    padding: 20px 0;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #e74c3c;
}

.nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.business-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.info-item i {
    margin-right: 10px;
    width: 16px;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    background: #f8f9fa;
    transition: margin-left 0.3s ease;
}

.top-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    margin-right: 20px;
    cursor: pointer;
    color: #333;
}

.top-header h1 {
    font-size: 24px;
    color: #2c3e50;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.datetime {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 25px;
}

.user-info i {
    font-size: 20px;
    color: #3498db;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 30px;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 28px;
    color: #2c3e50;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #707b7c);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.stat-content h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

/* Charts */
.dashboard-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-height: 450px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-container h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.chart-container canvas {
    flex: 1;
    max-height: 320px;
    width: 100% !important;
    height: auto !important;
}

/* Products Section */
.products-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

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

.search-bar input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #3498db;
}

.search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

#category-filter {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

.products-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
}

.products-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.products-table tr:hover {
    background: #f8f9fa;
}

/* POS Section */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.pos-header {
    margin-bottom: 25px;
}

.category-tabs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-tab.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.category-tab:hover {
    border-color: #3498db;
}

.products-grid-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.product-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
}

.product-card h4 {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-card .price {
    font-size: 18px;
    color: #27ae60;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-card .stock {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

/* Cart Section */
.cart-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    max-height: 80vh;
    overflow-y: auto;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.cart-header h3 {
    font-size: 20px;
    color: #2c3e50;
    font-weight: 600;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #666;
    font-size: 14px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.cart-summary {
    border-top: 2px solid #f0f0f0;
    padding-top: 20px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    padding-top: 12px;
    border-top: 2px solid #e0e0e0;
}

#discount-input {
    width: 100px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: right;
}

.payment-section h4 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.payment-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.payment-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-methods label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
}

.payment-amount {
    margin-bottom: 20px;
}

.change-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background: #e8f5e8;
    border-radius: 6px;
    font-weight: 600;
    color: #27ae60;
}

/* Reports Section */
.reports-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.report-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.report-card h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.report-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.top-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.sales-history {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
}

.sales-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
}

.sales-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.sales-table tr:hover {
    background: #f8f9fa;
}

/* Invoices Section */
.invoice-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.date-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.date-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date-filter-group label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.date-input {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 140px;
    transition: all 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.invoice-controls input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 250px;
}

.invoices-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.invoices-table {
    width: 100%;
    border-collapse: collapse;
}

.invoices-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
}

.invoices-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.invoices-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.paid {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.invoice-modal {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 20px;
    color: #2c3e50;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* Invoice Content - Optimizado para Impresora Térmica 58mm */
#invoice-content {
    padding: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.1;
    font-weight: bold;
    max-width: 384px; /* 58mm exacto */
    margin: 0 auto;
    background: white;
    color: black;
}

.thermal-invoice {
    background: white;
    color: black;
    padding: 0;
    margin: 0;
    width: 384px; /* 58mm exacto */
    overflow: hidden;
}

.invoice-header h1 {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin: 2px 0;
    line-height: 1.1;
}

.business-info {
    text-align: center;
    font-size: 10px;
    margin: 2px 0;
    line-height: 1.1;
}

.separator {
    border-top: 1px dashed #000;
    margin: 3px 0;
    padding: 0;
}

.invoice-info .info-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    margin: 1px 0;
    font-weight: bold;
    line-height: 1.1;
}

.invoice-items .items-header {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: bold;
    margin: 2px 0;
    line-height: 1.1;
}

.invoice-item {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    margin: 1px 0;
    font-weight: bold;
    line-height: 1.1;
    width: 100%;
}

.item-qty {
    flex: 0 0 20px;
    text-align: left;
    font-size: 9px;
}

.item-name {
    flex: 1;
    text-align: left;
    margin: 0 2px;
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.item-price {
    flex: 0 0 75px;
    text-align: right;
    font-weight: bold;
    font-size: 10px;
}

.invoice-totals .total-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    margin: 1px 0;
    font-weight: bold;
    line-height: 1.1;
}

.total-row.grand-total {
    font-size: 12px;
    font-weight: bold;
    border-top: 1px dashed #000;
    padding-top: 2px;
    margin-top: 2px;
}

.total-row.discount {
    color: #000;
}

.total-row.change {
    color: #000;
}

.invoice-footer .thank-you {
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    margin: 5px 0;
    line-height: 1.1;
}

.invoice-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px dashed #333;
}

.invoice-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.invoice-info {
    margin-bottom: 15px;
}

.invoice-items {
    margin-bottom: 15px;
}

.invoice-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.invoice-totals {
    border-top: 2px dashed #333;
    padding-top: 10px;
}

.invoice-totals .total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: bold;
}

.invoice-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    border-top: 2px solid #f0f0f0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pos-container {
        grid-template-columns: 1fr;
    }
    
    .cart-section {
        position: sticky;
        top: 100px;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
        max-height: 400px;
    }
    
    .chart-container {
        height: 350px;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .invoice-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .date-filters {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .date-filter-group {
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-charts {
        max-height: 350px;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .chart-container canvas {
        max-height: 250px;
    }
    
    .products-controls {
        flex-direction: column;
    }
    
    .invoice-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .date-filters {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .date-input {
        min-width: 100%;
    }
    
    .search-bar {
        max-width: none;
    }
    
    .products-grid-content {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .top-header {
        padding: 15px 20px;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .datetime {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .invoice-controls {
        flex-direction: column;
    }
    
    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .products-table,
    .sales-table,
    .invoices-table {
        font-size: 12px;
    }
    
    .products-table th,
    .sales-table th,
    .invoices-table th {
        padding: 10px 5px;
    }
    
    .products-table td,
    .sales-table td,
    .invoices-table td {
        padding: 10px 5px;
    }
}

/* Print Styles - Optimizado para Impresora Térmica 58mm */
@media print {
    .sidebar,
    .top-header,
    .modal-header,
    .invoice-actions,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .modal-content {
        box-shadow: none;
        margin: 0 !important;
        max-width: 384px !important;
        width: 384px !important;
        background: white !important;
        padding: 0 !important;
    }
    
    #invoice-content {
        padding: 0 !important;
        max-width: 384px !important; /* 58mm exacto */
        margin: 0 !important;
        font-size: 10px !important;
        font-weight: bold !important;
        line-height: 1.0 !important;
        width: 384px !important;
        overflow: hidden !important;
    }
    
    .thermal-invoice {
        width: 384px !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 10px !important;
    }
    
    .invoice-header h1 {
        font-size: 14px !important;
        margin: 1px 0 !important;
        line-height: 1.0 !important;
    }
    
    .business-info {
        font-size: 9px !important;
        margin: 1px 0 !important;
        line-height: 1.0 !important;
    }
    
    .separator {
        border-top: 1px dashed #000 !important;
        margin: 2px 0 !important;
        padding: 0 !important;
    }
    
    .info-row,
    .invoice-item,
    .total-row {
        font-size: 9px !important;
        margin: 0 0 1px 0 !important;
        font-weight: bold !important;
        line-height: 1.0 !important;
    }
    
    .items-header {
        font-size: 8px !important;
        margin: 1px 0 !important;
        line-height: 1.0 !important;
    }
    
    .grand-total {
        font-size: 11px !important;
        border-top: 1px dashed #000 !important;
        padding-top: 1px !important;
        margin-top: 2px !important;
        line-height: 1.0 !important;
    }
    
    .thank-you {
        font-size: 9px !important;
        margin: 3px 0 !important;
        line-height: 1.0 !important;
    }
    
    .item-qty {
        flex: 0 0 18px !important;
        font-size: 8px !important;
    }
    
    .item-name {
        max-width: 180px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 9px !important;
        margin: 0 1px !important;
    }
    
    .item-price {
        flex: 0 0 70px !important;
        text-align: right !important;
        font-size: 9px !important;
    }
    
    /* Evitar saltos de página */
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    html {
        margin: 0 !important;
        padding: 0 !important;
    }
}
