@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    margin: 0;
    color: #f5f5f5;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Estilos para la página de Login --- */
.login-body {
    background-image: url('../img/login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 380px;
    padding: 40px;
    background: rgba(10, 10, 10, 0.75);
    border: 1px solid #00aaff;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.login-container h2 {
    margin: 0 0 30px;
    padding: 0;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input {
    width: 100%;
    padding: 10px 0;
    font-size: 16px;
    color: #fff;
    border: none;
    border-bottom: 2px solid #555;
    outline: none;
    background: transparent;
}

.form-group label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 0;
    font-size: 16px;
    color: #888;
    pointer-events: none;
    transition: .5s;
}

/* Animación para la etiqueta cuando el input está en foco o lleno */
.form-group input:focus~label,
.form-group input:valid~label {
    top: -20px;
    left: 0;
    color: #00aaff;
    font-size: 12px;
}

button[type="submit"] {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #111;
    background-color: #00aaff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

button[type="submit"]:hover {
    background-color: #fff;
    color: #00aaff;
    box-shadow: 0 0 15px #00aaff;
}

.error {
    background-color: rgba(255, 0, 0, 0.3);
    color: #fff;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid red;
}

/* --- Estilos para el Panel (Dashboard) --- */
.dashboard-body {
    background-color: #111;
    color: #f5f5f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Estilo para el enlace del menú activo --- */
.main-nav li.active a {
    background-color: #00ff95;
    color: #111;
    font-weight: bold;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;

    background-color: #1a1a1a;
    border-bottom: 2px solid #00aaff;
    flex-wrap: wrap;
}

.logo-text {
    font-size: 24px;
    color: #00aaff;
    margin: 0;
    text-transform: uppercase;
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.main-nav a {
    color: #f5f5f5;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: color 0.3s, background-color 0.3s;
}

.main-nav a:hover {
    color: #111;
    background-color: #00aaff;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info span {
    margin-right: 20px;
    font-weight: bold;
}

.logout-btn {
    background-color: #ff4d4d;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #ff1a1a;
}

.main-content {
    padding: 40px;
    flex-grow: 1;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h2 {
    font-size: 32px;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.dashboard-header p {
    color: #888;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #333;
    text-decoration: none;
    color: #f5f5f5;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    border-color: #00aaff;
    box-shadow: 0 10px 20px rgba(0, 170, 255, 0.2);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.card-description {
    color: #888;
    font-size: 14px;
}

.main-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #1a1a1a;
    color: #555;
    border-top: 1px solid #333;
}

/* --- Estilos para las páginas de contenido (gestión) --- */
.content-area {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #333;
    overflow-x: auto;
    /* Permite scroll horizontal en contenedores pequeños */
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #00aaff;
    padding-bottom: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.content-header h2 {
    margin: 0;
    font-size: 24px;
}

/* --- Estilos para los botones --- */
.btn {
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background-color: #00aaff;
    color: #111;
}

.btn-primary:hover {
    background-color: #fff;
    box-shadow: 0 0 10px #00aaff;
}

.btn-secondary {
    background-color: #555;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #777;
}

.btn-danger {
    background-color: #ff4d4d;
    color: #fff;
}

.btn-danger:hover {
    background-color: #ff1a1a;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background-color: #218838;
}

/* Botón de Desactivar (Warning/Naranja) */
.btn-warning,
a.btn-warning,
a.btn-warning:link,
a.btn-warning:visited {
    background-color: #f39c12 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.btn-warning:hover,
a.btn-warning:hover {
    background-color: #ffffff !important;
    color: #f39c12 !important;
    box-shadow: 0 0 10px #f39c12 !important;
}

/* Estilos específicos para el botón DESACTIVAR */
.btn-desactivar,
a.btn-desactivar,
a.btn-desactivar:link,
a.btn-desactivar:visited {
    background-color: #f39c12 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    display: inline-block !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    font-weight: bold !important;
}

.btn-desactivar:hover,
a.btn-desactivar:hover {
    background-color: #ffffff !important;
    color: #f39c12 !important;
    box-shadow: 0 0 15px #f39c12 !important;
}


/* --- Estilos para la tabla de datos --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    color: #f5f5f5;
    min-width: 600px;
    /* Asegura un ancho mínimo para que el scroll funcione */
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.data-table thead th {
    background-color: #252525;
    color: #00aaff;
    font-size: 16px;
    text-transform: uppercase;
}

.data-table tbody tr:hover {
    background-color: #2a2a2a;
}

.data-table .actions a {
    margin-right: 10px;
    display: inline-block;
    margin-bottom: 5px;
}

/* --- Estilos para las etiquetas de estado --- */
.status {
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
}

.status-active {
    background-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.status-inactive {
    background-color: rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
}

/* --- Estilos para los formularios de gestión --- */
.form-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background-color: #1a1a1a;
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #333;
}

.form-container h2 {
    text-align: center;
    color: #00aaff;
    margin-bottom: 40px;
}

.form-group {
    position: relative;
    /* Clave para la posición de la label */
    margin-bottom: 35px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 5px;
    font-size: 16px;
    color: #fff;
    border: none;
    border-bottom: 2px solid #555;
    outline: none;
    background: transparent;
}

.form-group label {
    position: absolute;
    top: 10px;
    left: 5px;
    font-size: 16px;
    color: #888;
    pointer-events: none;
    transition: .5s;
}

/* Elige el 'select' y también los inputs que están en foco o que son válidos (tienen contenido) */
.form-group select:focus~label,
.form-group select:valid~label,
.form-group input:focus~label,
.form-group input:valid~label {
    top: -20px;
    left: 0;
    color: #00aaff;
    font-size: 12px;
}

/* El 'select' no tiene la pseudo-clase :valid de la misma forma, así que le damos un estilo base al select en sí */
.form-group select {
    color: #888;
}

.form-group select:valid {
    color: #fff;
}

.form-text {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    display: block;
    position: absolute;
    top: 45px;
}

.form-actions {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

/* --- Estilos para alertas y mensajes --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
    border: 1px solid transparent;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.5);
    border-color: #28a745;
}

.alert-danger {
    background-color: rgba(255, 77, 77, 0.5);
    border-color: #ff4d4d;
}

/* --- Estilos para Reportes --- */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.report-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-group-report {
    display: flex;
    flex-direction: column;
    /* Apila la etiqueta sobre el campo */
}

.form-group-report label {
    font-size: 14px;
    font-weight: bold;
    color: #bbb;
    margin-bottom: 8px;
    /* Espacio entre la etiqueta y el campo */
}

.form-group-report input[type="date"] {
    background-color: #252525;
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Exo 2', sans-serif;
    /* Usa la misma fuente del proyecto */
    font-size: 16px;
    /* Ayuda a que el calendario del navegador se vea oscuro */
    color-scheme: dark;
}

.report-form .form-group {
    margin-bottom: 0;
}

.report-form label {
    font-size: 14px;
    margin-bottom: 5px;
    display: block;
}

.report-form input[type="date"] {
    background-color: #252525;
    border: 1px solid #444;
    color: #fff;
    padding: 8px;
    border-radius: 5px;
}

.report-results {
    margin-top: 30px;
    overflow-x: auto;
}

.data-table tfoot th {
    font-size: 18px;
    color: #00aaff;
}

.card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #2a2a2a;
}

.card.disabled:hover {
    transform: none;
    border-color: #333;
    box-shadow: none;
}

/* --- Estilos para Reporte de Inventario --- */
.data-table tbody tr.low-stock {
    background-color: rgba(255, 165, 0, 0.2);
    /* Naranja semi-transparente */
    border-left: 5px solid #FFA500;
    /* Borde naranja */
}

.data-table tbody tr.low-stock strong {
    color: #FFA500;
    font-size: 1.1em;
}

.legend {
    margin-top: 20px;
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 5px;
    display: inline-block;
}

.legend-item {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 4px;
}

.low-stock-legend {
    background-color: rgba(255, 165, 0, 0.4);
    border: 1px solid #FFA500;
}

/* --- Estilos para el Dashboard Dinámico --- */

/* Contenedor de las tarjetas de resumen */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.summary-card {
    background-color: #1a1a1a;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
}

.summary-card .card-value {
    font-size: 36px;
    font-weight: bold;
    color: #00aaff;
    margin-bottom: 5px;
}

.summary-card .card-label {
    font-size: 16px;
    color: #aaa;
}

.summary-card .card-icon-bg {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
    opacity: 0.1;
    color: #fff;
}

/* Contenido principal del dashboard (2 columnas) */
.dashboard-main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Columna izquierda más ancha */
    gap: 30px;
}

.content-panel {
    background-color: #1a1a1a;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #333;
    overflow-x: auto;
}

.content-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

/* Lista de ventas recientes */
.recent-sales-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-sales-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 5px;
    border-bottom: 1px solid #2a2a2a;
    flex-wrap: wrap;
}

.recent-sales-list li:last-child {
    border-bottom: none;
}

.recent-sales-list .sale-client {
    color: #ddd;
}

.recent-sales-list .sale-total {
    font-weight: bold;
    color: #28a745;
    /* Verde para el dinero */
}

.recent-sales-list li.no-data {
    color: #888;
    justify-content: center;
}

/* Enlaces rápidos */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quick-link {
    background-color: #252525;
    padding: 15px;
    border-radius: 5px;
    text-decoration: none;
    color: #ddd;
    font-weight: bold;
    transition: all 0.3s;
    border-left: 5px solid transparent;
}

.quick-link:hover {
    background-color: #333;
    color: #00aaff;
    border-left: 5px solid #00aaff;
}

/* --- Estilos para Búsqueda y Paginación --- */
.content-header-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #00aaff;
}

.content-header-2 h2 {
    margin: 0;
}

.search-container {
    flex-grow: 1;
    max-width: 400px;
    width: 100%;
}

.search-container form {
    display: flex;
}

.search-container input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #444;
    border-radius: 5px 0 0 5px;
    background-color: #252525;
    color: #fff;
    outline: none;
}

.btn-search {
    padding: 10px 15px;
    border: 1px solid #00aaff;
    background-color: #00aaff;
    color: #111;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.pagination a {
    color: #ddd;
    text-decoration: none;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 5px;
    border: 1px solid #444;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #333;
    border-color: #555;
}

.pagination a.active {
    background-color: #00aaff;
    color: #111;
    font-weight: bold;
    border-color: #00aaff;
}

/* Estilos para imágenes en tablas y formularios */
.table-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.current-image img {
    max-width: 150px;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #444;
}

.input-file {
    background-color: #252525;
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
}

/* --- Estilos para la página de detalle del producto --- */
.product-name-link {
    color: #00aaff;
    text-decoration: none;
    font-weight: bold;
}

.product-name-link:hover {
    text-decoration: underline;
}

.product-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Columna de imagen más pequeña */
    gap: 40px;
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
}

.product-image-container img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    /* Para que la imagen se vea completa */
    border-radius: 10px;
    background-color: #252525;
}

.product-info-container h1 {
    margin-top: 0;
    color: #00aaff;
}

.product-description {
    color: #bbb;
    font-size: 16px;
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-item .info-label {
    display: block;
    color: #888;
    font-size: 14px;
    margin-bottom: 5px;
}

.info-item .info-value {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.info-item .price-value {
    color: #28a745;
    /* Verde para el precio */
    font-size: 22px;
}

.info-item .stock-value {
    color: #FFA500;
    /* Naranja para el stock */
}

.info-item.full-width {
    grid-column: 1 / -1;
    /* Ocupa todo el ancho */
}

/* --- Estilos para la Interfaz de Punto de Venta (POS) --- */
.pos-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Columna de productos más ancha */
    gap: 30px;
    height: calc(100vh - 150px);
    /* Ajusta la altura para ocupar la pantalla */
    min-height: 600px;
}

.pos-products,
.pos-cart {
    background-color: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
}

.pos-header {
    padding: 20px;
    border-bottom: 1px solid #333;
}

.pos-header h3 {
    margin: 0 0 15px 0;
}

.product-results,
.cart-items {
    flex-grow: 1;
    /* Hace que esta área crezca */
    overflow-y: auto;
    /* Añade scroll si el contenido es largo */
    padding: 20px;
}

.cart-summary {
    padding: 20px;
    border-top: 1px solid #333;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.summary-line.total {
    font-size: 22px;
    font-weight: bold;
    color: #00aaff;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #444;
}

.customer-section {
    padding: 20px;
    border-top: 1px solid #333;
}

.btn-block {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border-radius: 0 0 8px 8px;
    /* Redondea solo las esquinas inferiores */
}

/* --- Estilos para los Resultados de Productos en POS --- */
.product-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #2a2a2a;
    gap: 15px;
}

.product-item:last-child {
    border-bottom: none;
}

.product-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.product-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: bold;
    color: #ddd;
}

.product-stock {
    font-size: 12px;
    color: #888;
}

.product-price {
    font-weight: bold;
    font-size: 16px;
}

.btn-add-cart {
    padding: 8px 15px;
    font-size: 14px;
}

/* --- Estilos para los Items del Carrito --- */
.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
}

.item-name {
    font-weight: bold;
}

.item-qty {
    color: #888;
}

.item-price {
    font-weight: bold;
}

.item-remove {
    color: #ff4d4d;
    text-decoration: none;
    font-weight: bold;
    padding: 5px;
}

/* --- Estilos para el formulario de cantidad en el carrito --- */
.form-qty {
    display: flex;
    align-items: center;
}

.input-qty {
    width: 60px;
    padding: 5px;
    text-align: center;
    background-color: #252525;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px 0 0 5px;
}

/* Oculta las flechas por defecto del input number */
.input-qty::-webkit-outer-spin-button,
.input-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-update-qty {
    padding: 5px 10px;
    border: 1px solid #00aaff;
    background-color: #00aaff;
    color: #111;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
}

/* --- Estilos para la sección de clientes en POS --- */
.customer-section {
    padding: 20px;
    border-top: 1px solid #333;
    background-color: #252525;
}

.customer-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
}

.search-container-cliente input {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: #333;
    color: #fff;
}

.customer-results {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    max-height: 150px;
    overflow-y: auto;
}

.customer-results li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #333;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.search-container-cliente {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-search-cliente {
    flex-grow: 1;
    display: flex;
}

/* --- Estilos para el Recibo de Venta --- */
.receipt-container {
    max-width: 800px;
    width: 100%;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    color: #111;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #ccc;
    margin-bottom: 20px;
}

.receipt-header h1 {
    margin: 0;
    font-size: 28px;
    color: #111;
    text-transform: uppercase;
}

.company-name-receipt {
    font-size: 22px;
    font-weight: bold;
    color: #00aaff;
    margin: 5px 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.receipt-header h2 {
    margin: 0;
    color: #28a745;
    font-size: 18px;
}

.receipt-info {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.receipt-table th,
.receipt-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.receipt-table th {
    background-color: #f8f8f8;
}

.receipt-table tfoot .text-right {
    text-align: right;
    font-weight: bold;
}

.receipt-table tfoot .total {
    font-size: 1.2em;
    font-weight: bold;
    color: #111;
}

.receipt-actions {
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.receipt-actions .btn {
    margin: 0;
}

/* Estilos para impresión */
@media print {
    body {
        background-color: #fff !important;
    }

    .main-header,
    .main-footer,
    .receipt-actions {
        display: none !important;
    }

    .receipt-container {
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }
}

/* =========================================
   MEDIA QUERIES - RESPONSIVE DESIGN
   ========================================= */

/* Tablets y Pantallas Medianas (max-width: 992px) */
@media (max-width: 992px) {
    .dashboard-main-content {
        grid-template-columns: 1fr;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
    }

    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pos-products,
    .pos-cart {
        max-height: 500px;
    }
}

/* Móviles y Pantallas Pequeñas (max-width: 768px) */
@media (max-width: 768px) {

    /* Header y Navegación */
    .main-header {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }

    .logo-container {
        margin-bottom: 15px;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav li {
        width: 100%;
        margin: 5px 0;
    }

    .main-nav a {
        display: block;
        width: 100%;
        border-radius: 5px;
    }

    .user-info {
        margin-top: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .user-info span {
        margin-right: 0;
    }

    /* Contenido Principal */
    .main-content {
        padding: 20px;
    }

    /* Formularios */
    .form-container {
        padding: 20px;
    }

    .form-actions {
        justify-content: center;
    }

    .form-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Tablas */
    .content-area,
    .content-panel {
        padding: 15px;
    }

    /* Reportes */
    .report-form {
        flex-direction: column;
        align-items: stretch;
    }

    .report-form .btn {
        margin-top: 10px;
    }

    /* Recibos */
    .receipt-info {
        grid-template-columns: 1fr;
    }

    /* POS en móvil */
    .cart-item {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }

    .item-name {
        grid-column: 1 / -1;
    }

    .product-item {
        flex-direction: column;
        text-align: center;
    }

    .product-item-info {
        align-items: center;
    }
}

/* Pantallas Muy Pequeñas (max-width: 480px) */
@media (max-width: 480px) {
    .login-container {
        padding: 20px;
    }

    .dashboard-header h2 {
        font-size: 24px;
    }

    .content-header {
        flex-direction: column;
        text-align: center;
    }

    .content-header-2 {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        max-width: 100%;
    }


}

.receipt-table tfoot .text-right {
    text-align: right;
    font-weight: bold;
}

.receipt-table tfoot .total {
    font-size: 1.2em;
    font-weight: bold;
    color: #111;
}

.receipt-actions {
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.receipt-actions .btn {
    margin: 0;
}

/* Estilos para impresión */
@media print {
    body {
        background-color: #fff !important;
    }

    .main-header,
    .main-footer,
    .receipt-actions {
        display: none !important;
    }

    .receipt-container {
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }
}

/* =========================================
   MEDIA QUERIES - RESPONSIVE DESIGN
   ========================================= */

/* Tablets y Pantallas Medianas (max-width: 992px) */
@media (max-width: 992px) {
    .dashboard-main-content {
        grid-template-columns: 1fr;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
    }

    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pos-products,
    .pos-cart {
        max-height: 500px;
    }
}

/* Móviles y Pantallas Pequeñas (max-width: 768px) */
@media (max-width: 768px) {

    /* Header y Navegación */
    .main-header {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }

    .logo-container {
        margin-bottom: 15px;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav li {
        width: 100%;
        margin: 5px 0;
    }

    .main-nav a {
        display: block;
        width: 100%;
        border-radius: 5px;
    }

    .user-info {
        margin-top: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .user-info span {
        margin-right: 0;
    }

    /* Contenido Principal */
    .main-content {
        padding: 20px;
    }

    /* Formularios */
    .form-container {
        padding: 20px;
    }

    .form-actions {
        justify-content: center;
    }

    .form-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Tablas */
    .content-area,
    .content-panel {
        padding: 15px;
    }

    /* Reportes */
    .report-form {
        flex-direction: column;
        align-items: stretch;
    }

    .report-form .btn {
        margin-top: 10px;
    }

    /* Recibos */
    .receipt-info {
        grid-template-columns: 1fr;
    }

    /* POS en móvil */
    .cart-item {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }

    .item-name {
        grid-column: 1 / -1;
    }

    .product-item {
        flex-direction: column;
        text-align: center;
    }

    .product-item-info {
        align-items: center;
    }
}

/* Pantallas Muy Pequeñas (max-width: 480px) */
@media (max-width: 480px) {
    .login-container {
        padding: 20px;
    }

    .dashboard-header h2 {
        font-size: 24px;
    }

    .content-header {
        flex-direction: column;
        text-align: center;
    }

    .content-header-2 {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        max-width: 100%;
    }

    .btn {
        width: 100%;
        margin-bottom: 5px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   LOADING SPINNER & OVERLAY
   ========================================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 170, 255, 0.3);
    border-top-color: #00aaff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   SMOOTH ANIMATIONS & TRANSITIONS
   ========================================= */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Smooth page transitions */
.main-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Card animations */
.card,
.summary-card {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   PERFORMANCE OPTIMIZATIONS
   ========================================= */

/* GPU acceleration for animations */
.card,
.btn,
.main-nav a {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Lazy load placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #252525 25%, #2a2a2a 50%, #252525 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #1a1a1a;
    border: 1px solid #00aaff;
    border-radius: 5px;
    padding: 15px 20px;
    min-width: 250px;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    border-color: #28a745;
}

.toast.error {
    border-color: #ff4d4d;
}

.toast.warning {
    border-color: #FFA500;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================= */

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #00aaff;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #00aaff;
    color: #111;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* =========================================
   ADDITIONAL MOBILE OPTIMIZATIONS
   ========================================= */

@media (max-width: 480px) {

    /* Larger touch targets */
    .btn,
    .main-nav a,
    .logout-btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Optimize font sizes for readability */
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    /* Reduce padding on small screens */
    .main-content {
        padding: 15px;
    }

    .form-container {
        padding: 15px;
    }

    /* Stack form actions vertically */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* =========================================
   SISTEMA DE NOTIFICACIONES Y MODALES
   ========================================= */

/* =========================================
   NOTIFICACIONES DE PANTALLA COMPLETA
   ========================================= */

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.7) 0%, rgba(5, 5, 5, 0.98) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.notification-overlay.active {
    opacity: 1;
    visibility: visible;
}

.fullscreen-alert {
    text-align: center;
    padding: 60px;
    max-width: 600px;
    width: 90%;
    border-radius: 20px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(0, 170, 255, 0.3);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: translateY(30px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-overlay.active .fullscreen-alert {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 40px rgba(0, 170, 255, 0.2);
}

.fullscreen-alert .icon {
    font-size: 100px;
    margin-bottom: 25px;
    display: block;
    filter: drop-shadow(0 0 15px currentColor);
}

.fullscreen-alert h2 {
    font-size: 32px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.fullscreen-alert p {
    font-size: 20px;
    color: #bbb;
    margin-bottom: 35px;
    line-height: 1.5;
}

/* Colores por estado */
.fullscreen-alert.success {
    color: #4cd137;
    border-color: #4cd137;
}

.fullscreen-alert.danger {
    color: #ff4d4d;
    border-color: #ff4d4d;
}

.fullscreen-alert.warning {
    color: #ffc107;
    border-color: #ffc107;
}

.btn-close-notif {
    padding: 15px 40px;
    font-size: 16px;
    background: #00aaff;
    color: #111;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn-close-notif:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

/* Footer y Botones */
.modal-footer {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.modal-btn,
.btn-close-notif {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 10px;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.btn-confirm,
.btn-close-notif {
    background: #00aaff;
    color: #111;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.3);
}

.btn-confirm:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.btn-cancel {
    background: transparent;
    color: #fff;
    border: 1px solid #444;
}

.btn-cancel:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}


@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}