* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.pantalla-inicial {
    padding: 60px 20px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.pantalla-inicial h1 {
    color: #667eea;
    font-size: 32px;
    margin-bottom: 10px;
}

.pantalla-inicial p {
    color: #666;
    margin-bottom: 30px;
    font-size: 18px;
}

.botones-modo {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
}

.btn-modo {
    padding: 30px;
    border: none;
    border-radius: 15px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.btn-modo small {
    font-size: 14px;
    font-weight: normal;
    opacity: 0.9;
}

.btn-empleado {
    background: linear-gradient(135deg, #2ed573 0%, #1e9e54 100%);
}

.btn-admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-prueba {
    background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%);
}

.btn-modo:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.select-grande {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 20px;
}

.btn-grande {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    font-size: 18px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.header-prueba {
    background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%) !important;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-salir {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid white;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.nav-tabs {
    display: flex;
    background: #f5f5f5;
    overflow-x: auto;
    border-bottom: 2px solid #e0e0e0;
}

.nav-btn {
    flex: 1;
    padding: 15px 10px;
    border: none;
    background: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    min-width: 80px;
}

.nav-btn.active {
    background: white;
    color: #667eea;
    font-weight: bold;
    border-bottom: 3px solid #667eea;
}

.main-content {
    padding: 20px;
    min-height: 500px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

h3 {
    color: #555;
    margin: 20px 0 15px 0;
    font-size: 18px;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 5px;
    color: #1976d2;
    font-size: 14px;
}

.avisos-destacados {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.avisos-destacados h4 {
    color: #856404;
    margin-bottom: 10px;
}

.avisos-destacados p {
    color: #856404;
    margin: 5px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card h3 {
    color: white;
    font-size: 16px;
    margin-bottom: 15px;
}

.card p {
    margin: 8px 0;
    font-size: 14px;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-danger {
    background: #ff4757;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-success {
    background: #2ed573;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.form-container {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #e0e0e0;
}

.form-container input,
.form-container select,
.form-container textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.form-container textarea {
    min-height: 80px;
    resize: vertical;
}

.seccion-colapsable {
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.seccion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
    user-select: none;
}

.seccion-header:hover {
    background: #e8e8e8;
}

.seccion-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.toggle-icon {
    font-size: 16px;
    color: #667eea;
    font-weight: bold;
}

.seccion-contenido {
    padding: 20px;
    background: white;
}

.search-box {
    margin: 15px 0;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.list-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    transition: all 0.3s;
}

.list-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.list-item h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

.list-item p {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

.list-item .actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tarea-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tarea-item.completada {
    background: #f0f0f0;
    opacity: 0.7;
}

.tarea-item.completada h4 {
    text-decoration: line-through;
}

.tarea-checkbox {
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.tarea-info {
    flex: 1;
}

.tarea-info h4 {
    margin-bottom: 5px;
}

.tarea-info p {
    font-size: 12px;
    color: #999;
}

.momento-grupo {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.momento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    user-select: none;
}

.momento-header h3 {
    color: white;
    margin: 0;
    font-size: 16px;
}

.momento-contador {
    background: rgba(255,255,255,0.25);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    margin-left: 10px;
}

.momento-contenido {
    padding: 10px;
    background: #fafafa;
}

.categoria-grupo {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.categoria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f5f5f5;
    cursor: pointer;
    user-select: none;
    font-weight: bold;
    color: #333;
}

.categoria-header:hover {
    background: #ebebeb;
}

.categoria-contador {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.categoria-contenido {
    padding: 10px;
    background: white;
}

.conteo-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.conteo-item h4 {
    flex: 1;
    font-size: 18px;
}

.conteo-input {
    width: 100px;
    padding: 10px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
}

.evento-item {
    background: white;
    border-left: 5px solid #667eea;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
}

.evento-item.tipo-pedido { border-left-color: #ffa502; }
.evento-item.tipo-recepcion { border-left-color: #2ed573; }
.evento-item.tipo-conteo { border-left-color: #ff4757; }

.evento-item h4 { margin-bottom: 5px; }
.evento-item p { font-size: 14px; color: #666; }

.historial-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    font-size: 14px;
}

.historial-item strong { color: #667eea; }

.producto-pedido {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.producto-pedido label { flex: 1; font-weight: bold; }

.producto-pedido input {
    width: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.pedido-camara-item {
    background: #fff9e6;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
}

.pedido-camara-item.traido {
    background: #e8f5e9;
    border-color: #4caf50;
    opacity: 0.7;
}

.pedido-camara-item h4 { margin-bottom: 8px; }
.pedido-camara-item p { margin: 5px 0; font-size: 14px; }

.movimiento-item {
    background: white;
    border-left: 5px solid #667eea;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
}

.movimiento-item.entrada { border-left-color: #4caf50; }
.movimiento-item.salida { border-left-color: #ff5722; }
.movimiento-item h4 { margin-bottom: 8px; }
.movimiento-item p { margin: 5px 0; font-size: 14px; }

.stock-camara-item {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stock-camara-item h4 { margin: 0; font-size: 16px; }

.stock-camara-item .cantidad {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

#buscadorMovimiento,
#buscadorPedidoCamara {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-top: 5px;
}

#buscadorMovimiento:focus,
#buscadorPedidoCamara:focus {
    outline: none;
    border-color: #667eea;
}

#movimientoProducto,
#pedidoCamaraProducto {
    width: 100%;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-top: 5px;
    background: white;
}

.total-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-size: 16px;
}

.total-box.positivo { background: #e8f5e9; border-left-color: #4caf50; color: #2e7d32; }
.total-box.negativo { background: #ffebee; border-left-color: #f44336; color: #c62828; }
.total-box.neutro { background: #f5f5f5; border-left-color: #9e9e9e; }

.retiros-item {
    background: #fff9e6;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
}

.retiros-item input,
.retiros-item select {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.retiros-item label {
    font-weight: bold;
    font-size: 14px;
    margin-top: 8px;
    display: block;
}

.cierre-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
}

.cierre-item h4 { color: #667eea; margin-bottom: 10px; font-size: 18px; }

.cierre-item .detalle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0;
}

.cierre-item .totales {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.cierre-item .retiros-lista {
    background: #fff9e6;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.cierre-item .retiros-lista h5 { margin-bottom: 8px; color: #856404; }

.cierre-item .retiros-lista p {
    margin: 5px 0;
    font-size: 13px;
    padding-left: 10px;
    border-left: 2px solid #ffc107;
}

.caja-resumen {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
}

.caja-resumen h4 { color: #667eea; margin-bottom: 10px; }

.caja-resumen .fila {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.caja-resumen .fila:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 16px;
    padding-top: 12px;
    margin-top: 5px;
    border-top: 2px solid #667eea;
}

.caja-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
}

.caja-item h4 { color: #667eea; margin-bottom: 10px; }

.caja-item .detalle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0;
}

.gasto-item {
    background: white;
    border-left: 5px solid #ff4757;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
}

.gasto-item h4 { margin-bottom: 8px; color: #333; }

.gasto-item .categoria-tag {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
}

.gasto-item .monto {
    font-size: 20px;
    font-weight: bold;
    color: #ff4757;
}

.desglose-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 8px 0;
}

.desglose-item .barra {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 0 15px;
    overflow: hidden;
}

.desglose-item .barra-relleno {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.producto-rentable {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.producto-rentable .ranking {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    margin-right: 15px;
}

.producto-rentable .info { flex: 1; }

.producto-rentable .ganancia {
    font-size: 18px;
    font-weight: bold;
    color: #2ed573;
}

.aviso-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 5px solid #667eea;
    transition: all 0.3s;
}

.aviso-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.aviso-item.prioridad-urgente { border-left-color: #ff4757; background: #fff5f5; }
.aviso-item.prioridad-normal { border-left-color: #667eea; background: #f8f9ff; }
.aviso-item.prioridad-informativo { border-left-color: #2ed573; background: #f0fff4; }
.aviso-item.vencido { opacity: 0.6; border-left-color: #999; }

.aviso-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.aviso-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.aviso-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.aviso-badge.categoria-general { background: #e3f2fd; color: #1976d2; }
.aviso-badge.categoria-promocion { background: #fff3e0; color: #f57c00; }
.aviso-badge.categoria-cambio { background: #f3e5f5; color: #7b1fa2; }
.aviso-badge.categoria-urgente { background: #ffebee; color: #c62828; }
.aviso-badge.prioridad-urgente { background: #ff4757; color: white; }
.aviso-badge.prioridad-normal { background: #667eea; color: white; }
.aviso-badge.prioridad-informativo { background: #2ed573; color: white; }

.aviso-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.aviso-contenido {
    color: #555;
    line-height: 1.6;
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.aviso-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.aviso-vistos strong { color: #667eea; }

.aviso-sin-leer {
    background: #ffa502;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.aviso-expirado {
    background: #ff4757;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.tabla-previa {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
}

.tabla-previa th {
    background: #667eea;
    color: white;
    padding: 10px 8px;
    text-align: left;
    font-size: 13px;
}

.tabla-previa td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.tabla-previa tr.duplicado { background: #fff3cd; }

.tabla-previa input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.tabla-previa select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 13px;
}

.resumen-importacion {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.resumen-importacion span {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
}

.resumen-total { background: #e3f2fd; color: #1976d2; }
.resumen-nuevos { background: #e8f5e9; color: #2e7d32; }
.resumen-duplicados { background: #fff3cd; color: #856404; }
.resumen-descuentos { background: #fff3cd; color: #856404; }

@media (max-width: 768px) {
    .nav-btn { font-size: 12px; padding: 12px 8px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    h2 { font-size: 20px; }
    .header-info { flex-direction: column; align-items: flex-start; }
    .conteo-item, .caja-item .detalle, .cierre-item .detalle, .desglose-item { flex-direction: column; align-items: stretch; }
    .conteo-input { width: 100%; }
    .desglose-item .barra { margin: 10px 0; }
    .aviso-header, .aviso-footer { flex-direction: column; gap: 10px; align-items: flex-start; }
    .tabla-previa { font-size: 12px; }
    .tabla-previa th, .tabla-previa td { padding: 6px 4px; }
}