/* =====================================================
   SISTEMA POS - BOUTIQUE PUNTO VITALIS
   Estilos Principales
   ===================================================== */

/* Variables CSS - Paleta de Colores */
:root {
    --primary: #008080;
    --primary-dark: #006666;
    --primary-light: #4db6ac;
    --secondary: #001f3f;
    --secondary-light: #003366;
    --accent: #4db6ac;
    --white: #ffffff;
    --light-gray: #f5f7fa;
    --gray: #e0e0e0;
    --dark-gray: #666666;
    --text-dark: #333333;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* =====================================================
   PANTALLA DE BLOQUEO / PIN
   ===================================================== */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.lock-container {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.lock-logo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: var(--white);
}

.lock-container h1 {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.lock-container p {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pin-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gray);
    transition: var(--transition);
}

.pin-dot.filled {
    background: var(--primary);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 250px;
    margin: 0 auto;
}

.pin-key {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: var(--light-gray);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
}

.pin-key:hover {
    background: var(--primary);
    color: var(--white);
}

.pin-key:active {
    transform: scale(0.95);
}

.pin-key.clear {
    background: var(--danger);
    color: var(--white);
}

.pin-key.clear:hover {
    background: #d32f2f;
}

.pin-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 1rem;
    min-height: 1.25rem;
}

.locked-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
}

.locked-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* =====================================================
   LAYOUT PRINCIPAL
   ===================================================== */
.app-container {
    display: none;
    min-height: 100vh;
}

.app-container.active {
    display: flex;
}

/* Sidebar / Navegación */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.sidebar-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.75rem;
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sidebar-header span {
    font-size: 0.75rem;
    opacity: 0.8;
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

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

.nav-link.active {
    background: var(--primary);
}

.nav-link i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.nav-link span {
    font-size: 0.9375rem;
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.sync-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
}

.sync-indicator.offline {
    background: var(--warning);
}

.sync-indicator.syncing {
    background: var(--accent);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.btn-logout {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

/* Contenido Principal */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 1.5rem;
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.75rem;
    color: var(--secondary);
}

.page-subtitle {
    color: var(--dark-gray);
    font-size: 0.875rem;
}

/* =====================================================
   MÓDULO PUNTO DE VENTA (CAJA)
   ===================================================== */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    height: calc(100vh - 120px);
}

/* Panel de Productos */
.products-panel {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.categories-bar {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--light-gray);
    overflow-x: auto;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.625rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 25px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.search-bar {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
    overflow-y: auto;
    align-content: start;
}

.product-card {
    background: var(--white);
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.product-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.product-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--secondary);
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

.product-stock {
    font-size: 0.75rem;
    color: var(--dark-gray);
    margin-top: 0.25rem;
}

.product-stock.low {
    color: var(--warning);
}

.product-stock.out {
    color: var(--danger);
}

/* Carrito Lateral */
.cart-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-header {
    padding: 1rem 1.25rem;
    background: var(--primary);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.125rem;
}

.cart-count {
    background: var(--white);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--gray);
}

.cart-item:last-child {
    border-bottom: none;
}

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

.cart-item-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--secondary);
}

.cart-item-price {
    font-size: 0.8125rem;
    color: var(--dark-gray);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.qty-value {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.cart-item-total {
    font-weight: 600;
    color: var(--primary);
    min-width: 70px;
    text-align: right;
}

.cart-item-remove {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.125rem;
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: var(--transition);
}

.cart-item-remove:hover {
    opacity: 1;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--dark-gray);
    text-align: center;
    padding: 2rem;
}

.cart-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cart-summary {
    padding: 1.25rem;
    background: var(--light-gray);
    border-top: 2px solid var(--gray);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray);
}

.btn-process-sale {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-process-sale:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-process-sale:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
}

.btn-clear-cart {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 2px solid var(--danger);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

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

/* =====================================================
   MÓDULO INVENTARIO
   ===================================================== */
.inventory-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
}

.products-list-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    padding: 1rem 1.25rem;
    background: var(--secondary);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.125rem;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--gray);
}

.tab-btn {
    flex: 1;
    padding: 0.875rem;
    border: none;
    background: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--dark-gray);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    padding: 1rem;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

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

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

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray);
}

.data-table th {
    background: var(--light-gray);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    color: var(--dark-gray);
}

.data-table td {
    font-size: 0.9375rem;
}

.data-table tr:hover {
    background: var(--light-gray);
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background: var(--primary-light);
    color: var(--white);
}

.btn-edit:hover {
    background: var(--primary);
}

.btn-delete {
    background: #ffcdd2;
    color: var(--danger);
}

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

/* Formulario de Producto/Categoría */
.form-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    height: fit-content;
}

.form-panel h3 {
    color: var(--secondary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light-gray);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    background: var(--white);
    cursor: pointer;
}

.icon-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.icon-option {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    background: var(--light-gray);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.icon-option:hover {
    border-color: var(--primary);
}

.icon-option.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.btn-save {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-cancel {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    color: var(--dark-gray);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

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

/* =====================================================
   MÓDULO REPORTES
   ===================================================== */
.reports-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filters-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-size: 0.875rem;
}

.btn-filter {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-filter:hover {
    background: var(--primary-dark);
}

.btn-export {
    padding: 0.75rem 1.5rem;
    background: var(--secondary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-export:hover {
    background: var(--secondary-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.sales {
    background: rgba(0, 128, 128, 0.1);
    color: var(--primary);
}

.stat-icon.count {
    background: rgba(0, 31, 63, 0.1);
    color: var(--secondary);
}

.stat-icon.products {
    background: rgba(77, 182, 172, 0.2);
    color: var(--accent);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--dark-gray);
    font-size: 0.875rem;
}

.sales-table-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--dark-gray);
}

.no-data-icon {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* =====================================================
   MODALES
   ===================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.125rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: var(--light-gray);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* =====================================================
   TICKET / RECIBO
   ===================================================== */
.ticket-preview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.ticket-preview.active {
    display: flex;
}

.ticket-container {
    background: var(--white);
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.ticket {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.ticket-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--dark-gray);
}

.ticket-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.ticket-company-name {
    font-size: 0.6875rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.ticket-info {
    font-size: 0.75rem;
    color: var(--dark-gray);
}

.ticket-info p {
    margin: 0.125rem 0;
}

.ticket-datetime {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.75rem;
}

.ticket-items {
    border-top: 1px dashed var(--dark-gray);
    border-bottom: 1px dashed var(--dark-gray);
    padding: 0.75rem 0;
    margin-bottom: 0.75rem;
}

.ticket-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.ticket-item-name {
    flex: 1;
}

.ticket-item-qty {
    width: 40px;
    text-align: center;
}

.ticket-item-price {
    width: 70px;
    text-align: right;
}

.ticket-totals {
    margin-bottom: 1rem;
}

.ticket-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.ticket-total-row.grand-total {
    font-weight: 700;
    font-size: 1rem;
    border-top: 1px solid var(--dark-gray);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.ticket-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px dashed var(--dark-gray);
}

.ticket-slogan {
    font-style: italic;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ticket-thanks {
    font-size: 0.8125rem;
    color: var(--dark-gray);
}

.ticket-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--light-gray);
}

.btn-print {
    flex: 1;
    padding: 0.75rem;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-print:hover {
    background: var(--primary-dark);
}

.btn-close-ticket {
    flex: 1;
    padding: 0.75rem;
    background: var(--white);
    border: 2px solid var(--gray);
    border-radius: var(--radius-sm);
    color: var(--dark-gray);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

/* =====================================================
   ESTILOS DE IMPRESIÓN
   ===================================================== */
@media print {
    body * {
        visibility: hidden;
    }

    .ticket-preview,
    .ticket-preview * {
        visibility: visible;
    }

    .ticket-preview {
        position: absolute;
        left: 0;
        top: 0;
        background: white;
        padding: 0;
    }

    .ticket-container {
        box-shadow: none;
        border-radius: 0;
        max-width: 100%;
    }

    .ticket-actions {
        display: none !important;
    }

    .ticket {
        padding: 0;
    }
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
        padding: 1rem 0.5rem;
    }

    .sidebar-header h1,
    .sidebar-header span,
    .nav-link span,
    .sidebar-footer .sync-status span {
        display: none;
    }

    .sidebar-logo {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .nav-link {
        justify-content: center;
        padding: 0.875rem;
    }

    .nav-link i {
        margin-right: 0;
    }

    .main-content {
        margin-left: 70px;
    }

    .pos-container {
        grid-template-columns: 1fr;
    }

    .cart-panel {
        position: fixed;
        bottom: 0;
        left: 70px;
        right: 0;
        height: auto;
        max-height: 50vh;
        border-radius: var(--radius) var(--radius) 0 0;
        z-index: 50;
        transform: translateY(calc(100% - 60px));
        transition: var(--transition);
    }

    .cart-panel.expanded {
        transform: translateY(0);
    }

    .inventory-container {
        grid-template-columns: 1fr;
    }

    .form-panel {
        position: fixed;
        bottom: 0;
        left: 70px;
        right: 0;
        border-radius: var(--radius) var(--radius) 0 0;
        max-height: 70vh;
        overflow-y: auto;
        transform: translateY(100%);
        transition: var(--transition);
        z-index: 50;
    }

    .form-panel.active {
        transform: translateY(0);
    }
}

/* Móvil */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 0.5rem;
        justify-content: space-around;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .sidebar-header,
    .sidebar-footer {
        display: none;
    }

    .nav-menu {
        display: flex;
        justify-content: space-around;
        width: 100%;
    }

    .nav-item {
        margin-bottom: 0;
    }

    .nav-link {
        flex-direction: column;
        padding: 0.5rem;
        font-size: 0.6875rem;
    }

    .nav-link i {
        font-size: 1.25rem;
    }

    .nav-link span {
        display: block;
        font-size: 0.625rem;
    }

    .main-content {
        margin-left: 0;
        margin-bottom: 70px;
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.375rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-card {
        padding: 0.75rem;
    }

    .product-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .categories-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.75rem;
        -webkit-overflow-scrolling: touch;
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .cart-panel {
        left: 0;
    }

    .form-panel {
        left: 0;
    }

    .filters-panel {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.8125rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.625rem 0.5rem;
    }

    .lock-container {
        padding: 2rem;
    }

    .lock-logo {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .pin-key {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Móvil pequeño */
@media (max-width: 380px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .product-name {
        font-size: 0.75rem;
    }

    .product-price {
        font-size: 0.875rem;
    }
}

/* =====================================================
   ANIMACIONES Y EFECTOS
   ===================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

.shake {
    animation: shake 0.3s ease;
}

/* Notificaciones Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--dark-gray);
}

/* Loader */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   UTILIDADES
   ===================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--dark-gray); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }

.hidden { display: none !important; }
.visible { display: block !important; }