/* CSS Central de JJ Iluminación - POS, Inventario y Facturación */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Variables CSS */
:root {
    /* Modo Claro (Default) */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-sidebar: #0f172a;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Accentos */
    --accent: #f59e0b; /* Ámbar cálido (iluminación) */
    --accent-hover: #d97706;
    --accent-rgb: 245, 158, 11;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --info: #3b82f6;
    
    /* Efectos */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(245, 158, 11, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --sidebar-width: 260px;
}

[data-theme="dark"] {
    /* Modo Oscuro */
    --bg-primary: #0b0f19;
    --bg-secondary: #161b26;
    --bg-sidebar: #090d16;
    --border-color: rgba(255, 255, 255, 0.07);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.25);
}

/* Estilos de Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* --- VISTA DE LOGIN --- */
.login-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, var(--bg-primary) 0%, rgba(var(--accent-rgb), 0.05) 90.1%);
    position: relative;
    padding: 20px;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-logo span {
    color: var(--accent);
    text-shadow: var(--shadow-glow);
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #111827;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}
.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-success {
    background-color: var(--success);
    color: white;
}
.btn-success:hover {
    background-color: var(--success-hover);
}

.login-quick {
    margin-top: 30px;
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
}

.login-quick p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.quick-btn {
    padding: 10px 5px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.quick-btn:hover {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
    transform: translateY(-2px);
}

.quick-btn i {
    font-size: 1.1rem;
    color: var(--accent);
}

/* --- SHELL PRINCIPAL DEL SISTEMA --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: #f8fafc;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand span {
    color: var(--accent);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 10px;
    flex-grow: 1;
    overflow-y: auto;
}

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

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.sidebar-menu a:hover, 
.sidebar-menu li.active a {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

.sidebar-menu li.active a {
    border-left: 4px solid var(--accent);
    background-color: rgba(var(--accent-rgb), 0.1);
}

.sidebar-user {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-details h4 {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.user-details span {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: capitalize;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    font-size: 0.8rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ef4444;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* --- MAIN CONTENT & HEADER --- */
.main-layout {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
}

.topbar {
    height: 70px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    transition: var(--transition);
}

.topbar-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: var(--bg-primary);
    color: var(--accent);
}

.content-body {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

/* --- CARDS & GRID LAYOUTS --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.kpi-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 5px;
}

.kpi-details h3 {
    font-size: 1.8rem;
    font-weight: 700;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.kpi-icon.amber {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}
.kpi-icon.blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info);
}
.kpi-icon.green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.kpi-icon.red {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.dashboard-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

.chart-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- TABLAS --- */
.table-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 30px;
}

.table-header-bar {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 14px 24px;
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] th {
    background-color: rgba(255, 255, 255, 0.02);
}

td {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(var(--accent-rgb), 0.02);
}

.badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}
.badge-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* --- PUNTO DE VENTA (POS) --- */
.pos-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    height: calc(100vh - 150px);
    overflow: hidden;
}

@media (max-width: 1200px) {
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
}

.pos-products {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

.pos-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.pos-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.cat-pill {
    padding: 8px 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cat-pill.active, .cat-pill:hover {
    background-color: var(--accent);
    color: #111827;
    border-color: var(--accent);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
}

.product-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%; /* Permite alinear alturas en la fila */
}

.product-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.product-card-img {
    width: 100%;
    aspect-ratio: 1.2 / 1; /* Relación de aspecto rectangular y compacta */
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2.2rem;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .product-card-img {
    background-color: #1f2937;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* ¡Muestra la imagen completa sin recortar bordes! */
    background-color: #ffffff;
}

[data-theme="dark"] .product-card-img img {
    background-color: #111827;
}

.product-card-body {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.product-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 32px; /* Espacio para 2 líneas sin recortar */
    line-height: 1.25;
}

.product-card-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}

.product-card-stock {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.product-card-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--danger);
    color: white;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
}

/* Carrito POS */
.pos-cart {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    height: 100%;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr 80px 70px 30px;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-title {
    font-size: 0.85rem;
    font-weight: 500;
}

.cart-item-title span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cart-qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.cart-qty-ctrl button {
    background: var(--bg-primary);
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.cart-qty-ctrl button:hover {
    background-color: var(--border-color);
}

.cart-qty-ctrl input {
    width: 30px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    font-size: 0.8rem;
    background: transparent;
    color: var(--text-primary);
}

.cart-item-subtotal {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
}

.btn-remove-item {
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-remove-item:hover {
    transform: scale(1.15);
}

.cart-checkout-box {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.client-select-group {
    margin-bottom: 15px;
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkout-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 8px;
}

.checkout-row.total span:last-child {
    color: var(--accent);
}

.pos-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

/* --- MODALES / VENTANAS EMERGENTES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 550px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(-30px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-close-modal:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.01);
}

[data-theme="dark"] .modal-footer {
    background-color: rgba(255, 255, 255, 0.01);
}

/* --- TOASTER NOTIFICATIONS --- */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.notification {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    animation: slideIn 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
}

.notification.success {
    border-left-color: var(--success);
}

.notification.danger {
    border-left-color: var(--danger);
}

.notification.info {
    border-left-color: var(--info);
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

.notification.fade-out {
    animation: slideOut 0.3s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideOut {
    to { transform: translateX(120%); opacity: 0; }
}

/* --- ESTILOS DE IMPRESIÓN (INVOICE & TICKET) --- */
@media print {
    /* Ocultar barra lateral y superior del sistema */
    .sidebar, .topbar, .topbar-actions, .topbar-title, .no-print, button, .btn {
        display: none !important;
    }
    
    body, .main-layout {
        margin: 0 !important;
        padding: 0 !important;
        background-color: white !important;
        color: black !important;
        width: 100% !important;
    }
    
    .print-container {
        display: block !important;
        padding: 20px !important;
    }
}

/* Contenedor especial de impresión para cuando se abre */
.print-container {
    background-color: white;
    color: #1a1a1a;
    padding: 40px;
    border-radius: var(--radius-md);
    max-width: 800px;
    margin: 20px auto;
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
}

.print-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid #334155;
    padding-bottom: 20px;
}

.print-brand h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.print-brand p {
    color: #475569;
    font-size: 0.85rem;
    margin-top: 4px;
}

.print-meta {
    text-align: right;
}

.print-meta h3 {
    font-size: 1.2rem;
    color: #f59e0b;
    margin-bottom: 6px;
}

.print-meta p {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 2px;
}

.print-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.print-info-box h4 {
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 4px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.print-table th {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-bottom: 2px solid #cbd5e1 !important;
    padding: 10px !important;
    font-size: 0.85rem !important;
}

.print-table td {
    padding: 10px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 0.9rem !important;
    background-color: white !important;
}

.print-totals {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

.print-totals-table {
    width: 250px;
}

.print-totals-table td {
    padding: 6px 12px !important;
    border: none !important;
}

.print-totals-table tr.total td {
    border-top: 2px solid #334155 !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #0f172a;
}

.print-sat-box {
    border: 1px solid #cbd5e1;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    gap: 20px;
    font-size: 0.75rem;
    color: #475569;
    background-color: #f8fafc;
}

.print-sat-qr {
    width: 90px;
    height: 90px;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    font-size: 0.7rem;
    text-align: center;
}

.print-sat-data {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.print-sat-data strong {
    color: #1e293b;
}

/* Ticket térmico de 80mm */
.ticket-container {
    width: 80mm;
    background-color: white;
    color: black;
    padding: 5mm;
    font-size: 11px;
    line-height: 1.3;
}

.ticket-header {
    text-align: center;
    margin-bottom: 5mm;
}

.ticket-header h2 {
    font-size: 14px;
    font-weight: 700;
}

.ticket-divider {
    border-top: 1px dashed black;
    margin: 3mm 0;
}

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

.ticket-table th {
    background: none !important;
    border-bottom: 1px dashed black !important;
    padding: 1mm 0 !important;
    font-size: 10px !important;
    text-align: left;
    color: black !important;
}

.ticket-table td {
    border: none !important;
    padding: 1.5mm 0 !important;
    font-size: 10px !important;
    background: none !important;
}

.ticket-totals {
    margin-top: 3mm;
    text-align: right;
}

.ticket-totals table {
    width: 100%;
}

.ticket-totals td {
    padding: 0.5mm 0 !important;
}
