* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* Estilos para login y registro */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-login:hover {
    background: #5a67d8;
    transform: scale(1.02);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.login-container a {
    color: #667eea;
    text-decoration: none;
}

.login-container a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: white;
    padding: 15px 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar h1 {
    color: #333;
    font-size: 24px;
}

.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.user-details {
    background: #f8f9fa;
    padding: 5px 15px;
    border-radius: 8px;
}

.user-name {
    font-weight: bold;
    font-size: 14px;
}

/* Botones */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: scale(1.02);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-logout {
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

/* Tabla */
.table-container {
    margin: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
    font-size: 13px;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

tr:hover {
    background: #f5f5f5;
}

.productos-cell {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Botones de acción */
.btn-ver, .btn-editar, .btn-eliminar {
    padding: 5px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin: 0 2px;
}

.btn-ver {
    background: #17a2b8;
    color: white;
}

.btn-ver:hover {
    background: #138496;
}

.btn-editar {
    background: #ffc107;
    color: #333;
}

.btn-editar:hover {
    background: #e0a800;
}

.btn-eliminar {
    background: #dc3545;
    color: white;
}

.btn-eliminar:hover {
    background: #c82333;
}

/* Formularios */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Mensajes */
.mensaje {
    padding: 10px 15px;
    margin: 10px 20px;
    border-radius: 5px;
    text-align: center;
}

.mensaje.exito {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.no-registros {
    text-align: center;
    padding: 40px;
    color: #999;
}

.btn-auditoria {
    background: #6f42c1;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-auditoria:hover {
    background: #5a32a3;
    transform: scale(1.02);
}

/* Logo en esquina superior izquierda - Sin recuadro */
.logo-top-left {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.login-logo-small {
    width: auto;
    height: 60px;
    object-fit: contain;
    /* Eliminar bordes, sombras y fondos */
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .producto-row {
        flex-wrap: wrap;
    }
    
    .producto-row select, .producto-row input {
        flex: 1 1 100% !important;
    }
}